简体   繁体   中英

“where not equal to” in Couchbase

I want to be able to use a “where not equal to” WHERE clause in Couchbase.

This code works to INCLUDE “Not Available” records (once you set the Analyser to 'keyword')

cbft.NewMatchQuery("Not Available").Field("Status"),

But I want to be able to return all records where the Status is anything other than “Not Available”.

I am not familiar with the Go SDK, but have you tried to use the "Required, Optional, and Exclusion" operators ( https://docs.couchbase.com/server/5.5/fts/fts-query-types.html )? They probably are exactly what you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM