How to configure the FTS scoring?

Ah you’ve identified bug.

With your original index definition, if you try this query, things should work …

SELECT meta().id
FROM `search` AS a USE INDEX(USING FTS)
WHERE sub_type="me"
    AND SEARCH(a,{"query": { "query": "app_name:dark" }})

SELECT * however is failing to fetch your the results, because the results go through a “verification” phase where the query is unaware that you’ve mapped a field to a different name.

Here’s the query you’ll need to run for this to get results as expected …

SELECT *
FROM `search` AS a USE INDEX(USING FTS)
WHERE sub_type="me"
    AND SEARCH(a,{"query": { "query": "app_name:dark" }}, {"index": "search_reduced"})

However, there’s a bug in the N1QL’s verification path when you change the name of your fields within the search index. I’ll put a fix in for this soon.

Ref: https://issues.couchbase.com/browse/MB-44356