Pergunta

It appears that the default conjunction for CouchDB-Lucene is OR:

artist:muse track:"feeling good"

Might return:

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

How can I configure CouchDB-Lucene so that two statements like at the top here are considered to be AND'd together, rather than OR'd?

Foi útil?

Solução

From my readme file at https://github.com/rnewson/couchdb-lucene/, you can use a parameter to change this;

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

That is;

?q="hello there"&default_operator="AND"
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top