we have created the Adaptive index using the below query which works fine.
CREATE INDEX adaptive_index1
ON testbucket(DISTINCT PAIRS({datemodified, doctype, syncchannel,wogismodelid}));
And we need to ignore the documents with IDs starting with ‘_sync’, so we have deleted the existing index and created a fresh index by adding where Clause to it.
CREATE INDEX adaptive_index1
ON `testbucket`(DISTINCT PAIRS({datemodified, doctype, syncchannel,wogismodelid}))
WHERE meta(`testbucket `).id NOT LIKE '_sync%' ;
While creating index we did not get any errors, but when we try to query data we are getting ‘No index available’ error. below is the query which we are attempted.
i have tried your suggestion but still no improvement in it, please refer below shown error message
No index available on keyspace testbucket that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online.
CREATE INDEX adaptive_index1
ON `testbucket`(DISTINCT PAIRS({datemodified, doctype, syncchannel,wogismodelid,META().id}))
WHERE meta(`testbucket `).id NOT LIKE '_sync%' ;
select * from testbucket where (meta().id NOT LIKE '_sync%' ) AND doctype = "fnotes"