Couchbase中的“不等于”

我希望能够在Couchbase中使用“不等于” WHERE子句。</ p> \ n

此代码可用于包含“不可用”记录(一旦将分析仪设置为“关键字”)</ em> </ p>

  cbft。  NewMatchQuery(“ Not Available”)。Field(“ Status”),
</ code> </ pre>

但是我希望能够返回状态不是“ 不可用”。</ p>
</ div>

展开原文

原文

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”.

1个回答



我对Go SDK不熟悉,但是您是否尝试使用“ Required,Optional和Exclusion”运算符(< href =“ https://docs.couchbase.com/server/5.5/fts/fts-query-types.html” rel =“ nofollow noreferrer”> https://docs.couchbase.com/server/5.5/fts/ FTS-查询types.html )? 它们可能正是您所需要的。</ p>
</ div>

展开原文

原文

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.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问