Empty Search on CB 5.0

#1

Hi Everyone,
I am using CB Enterprise 5.0.1 and working on Full Text Search. I have a requirement where I have to hit an empty search (without any search term) and result should come out on a particular order. Tried this on CB search tab but results are coming empty.
Is this functionality not supported in CB? If yes, any planes to release this ?

Thanks in advance!
Divya Garg

#2

@divya.garg121 I don’t really understand, can you let us know what response do you expect? If you want to do a “full bucket scan” you might be better off with a N1Ql primary index.

#3

FTS do have a query type match_all which matches all docs, though without knowing the use case using this isn’t recommended.
And underneath the web option you tried, there is a querystring query. You need to try out different queries based on the exact search requirement. (it wont be possible over the web interface given)

curl -XPOST -H “Content-Type: application/json” -uUSER:PWD http://address:port/api/index/{fts_index_name}/query -d ‘{
“query”:
{“match_all”: {}}
}’

#4

Thanks for the reply.
I can use N1Q1 but we are using different type of FTS queries like Fuzzy and wildcard and planned to use Full Text search only which are efficient also . I have to get 6 document fields with limit to 500 and sorting on a given field. Same can be achieved using simple select N1Q1 query but it is talking too much time around 3 mins (as there is no where clause) which will not fit into our purpose. I need to get records within 2 -3 seconds of time. Is there a way to do it ?
Thanks

#5

Thanks I have used the matchAll option to match with all records. Thanks.