0

CouchDB-Lucene 的默认连接似乎是OR

artist:muse track:"feeling good"

可能返回:

{ "artist": "Muse", "track": "Feeling Good", "score": 5.9 }
{ "artist": "Nina Simone", "track": "Feeling Good", "score": "1.2" }

如何配置 CouchDB-Lucene,以便将此处顶部的两个语句视为AND'd 一起,而不是OR'd?

4

1 回答 1

1

从我在https://github.com/rnewson/couchdb-lucene/的自述文件中,您可以使用参数来更改它;

default_operator
Change the default operator for boolean queries. Defaults to "OR", 
other permitted value is "AND".

那是;

?q="hello there"&default_operator="AND"
于 2013-07-04T15:30:18.970 回答