Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a global setting to change the default TERM PRESENCE to AND vs OR #512

Open
imthenachoman opened this issue Apr 13, 2022 · 0 comments

Comments

@imthenachoman
Copy link

From the documentation https://lunrjs.com/guides/searching.html#term-presence

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").

Related: #332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant