By default, Lunr combines multiple terms together in a search with a logical OR. That is, a search for “foo bar” will match documents that contain “foo” or contain “bar” or contain both. This behaviour is controllable at the term level, i.e. the presence of each term in matching documents can be specified.
I understand we can change this behavior with idx.search("+foo +bar").
I am wondering if there is a setting somewhere that can make the default behavior a binary AND such that the following query uses a binary AND: idx.search("foo bar").
From the documentation https://lunrjs.com/guides/searching.html#term-presence
I understand we can change this behavior with
idx.search("+foo +bar")
.I am wondering if there is a setting somewhere that can make the default behavior a binary
AND
such that the following query uses a binaryAND
:idx.search("foo bar")
.Related: https://github.com/olivernn/lunr.js/pull/332