We’re using the nodejs sdk v3.0.5, and in our app we’re building FTS queries using this syntax:
const name = Couchbase.SearchQuery.wildcard(`${name}*`).field('name');
const queries = [name];
const query = Couchbase.SearchQuery.conjuncts();
If I wanted to add a clause to exclude documents where a “deleted_at” field is null, how would I do that?
const notDeleted = Couchbase.SearchQuery.match(null).field('deleted_at');
const queries = [name];
const query = Couchbase.SearchQuery.conjuncts();
this produces a query object that gets added to the other clauses
{"match":null,"field":"deletedAt"}
but it doesn’t seem to affect the query results at all (I do have that field deleted_at
added to my FTS index)
Any guidance on this? Seems like a normal thing to do, just not sure how to proceed.