couchdb-lucene的默认连接

时间:2013-07-04 10:54:01

标签: couchdb-lucene

看来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',而不是OR'd?

1 个答案:

答案 0 :(得分: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"