How to configure the FTS scoring?

iI get the same result in 12.6 ms compared with 1.3 seconds. My only concern is how do I take care of the order of the correct results.

The N1QL query and the FTS query are NOT a fair comparison. With N1QL you’re fetching some document content that isn’t indexed, while the straight FTS query you’re just obtained document IDs, so there’s an extra step you’re doing within N1QL. Here’s how I recommend you change things to get comparable results …

SELECT search_meta()
FROM `search` AS a USE INDEX(USING FTS)
WHERE sub_type="me"
    AND SEARCH(a,{"query": { "query": "app_name:dark" }, "fields":["a_app_bundle_id"]})

For this, you’ll need to checkbox “store” for the a_app_bundle_id field within your FTS index definition.