JP.
JP.

Reputation: 5594

Default conjunction for couchdb-lucene

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?

Upvotes: 0

Views: 62

Answers (1)

Robert Newson
Robert Newson

Reputation: 4631

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"

Upvotes: 1

Related Questions