Description
Cheshire Cat - build 3739
There are two collections in this fts index - my_collection and other_collection.
There is one "michael" document in each.
The first query correctly specifies both collection names in the collections parameter and gets two hits.
curl -XPOST -H 'Content-Type: application/json' -u Administrator:password http://10.144.210.101:8094/api/index/idx-my_bucket-my_scope-my_collection/query -d '{"collections":["my_collection","other_collection"],"query":{"query":"michael"}}' |
{"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"query":"michael"},"size":10,"from":0,"highlight":null,"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false,"search_after":null,"search_before":null},"hits":[{"index":"idx-my_bucket-my_scope-my_collection_6b187ebdb55055c1_6ddbfb54","id":"1","score":0.5563327807133482,"sort":["_score"],"fields":{"_$c":"other_collection"}},{"index":"idx-my_bucket-my_scope-my_collection_6b187ebdb55055c1_6ddbfb54","id":"4","score":0.5563327807133482,"sort":["_score"],"fields":{"_$c":"my_collection"}}],"total_hits":2,"max_score":0.5563327807133482,"took":1649430,"facets":null} |
This second request has one good collection name, and the second collection does not exist. It returns the one hit from the good collection, but is silent about the the other collection name not belonging to the index.
curl -XPOST -H 'Content-Type: application/json' -u Administrator:password http://10.144.210.101:8094/api/index/idx-my_bucket-my_scope-my_collection/query -d '{"collections":["my_collection","qaskdjkjdkjkdjd"],"query":{"query":"michael"}}' |
{"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"query":"michael"},"size":10,"from":0,"highlight":null,"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false,"search_after":null,"search_before":null},"hits":[{"index":"idx-my_bucket-my_scope-my_collection_6b187ebdb55055c1_6ddbfb54","id":"4","score":0.4154527559218956,"sort":["_score"],"fields":{"_$c":"my_collection"}}],"total_hits":1,"max_score":0.4154527559218956,"took":275874,"facets":null} |
Attachments
For Gerrit Dashboard: MB-44129 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
145618,2 | MB-44129: Emit an error if a query requests for non-indexed collections | master | cbft | Status: ABANDONED | 0 | 0 |