FTS search() having strange results

if I run this query

SELECT *
FROM search AS a
WHERE sub_type=“market-explorer”
AND SEARCH(a,{ “fields”: ["*"], “query”: { “query”: “app_provider_name: dark” }})

I get

{
  "results": []
}

if I do the same query with META(a).id instead of *

SELECT META(a).id
FROM search AS a
WHERE sub_type=“market-explorer”
AND SEARCH(a,{ “fields”: ["*"], “query”: { “query”: “app_provider_name: dark” }})

I get the correct results:

[
  {
    "id": "s:284fc6d1-85ad-4e14-80bf-be65979d5d0b:me"
  },
  {
    "id": "s:8058bf27-112b-4350-a4e8-03174f6684f1:me"
  }
]

What could be the problem?

That’s a bug we identified recently in the verification path (when you run select * or when you select an unindexed field) with query string queries - https://issues.couchbase.com/browse/MB-44356 (this will be addressed in the upcoming release).

Try the following queries and you should see consistent results …

SELECT *
FROM search AS a
WHERE sub_type="market-explorer"
AND SEARCH(a,"app_provider_name: dark" )
SELECT *
FROM search AS a
WHERE sub_type="market-explorer"
AND SEARCH(a,{ "fields": ["*"], "query": { "field": "app_provider_name", "match":"dark" }})