看来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?
答案 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"