According to official documentation of lunrjs:
"Searches for multiple terms are also supported. If a document matches at least one of the search terms, it will show in the results. The search terms are combined with OR".
Is there any way to achieve that only if a document matches all the search terms it will show the results?
Having these data indexed:
[
{id: 1, text: "foo", body: "jander"}
{id: 2, text: "bar", body: "clander"},
{id: 3, text: "foo bar", body: "jander crispy clander"}
{id: 4, text: "foz", body: "lorem ipsum"}
...
]
If you search by:
idx.search("foo jander clander");
I wish to have only one result ignoring the other two because they don't contain all terms but a few:
// found (1)
{id: 3, text: "foo bar", body: "jander crispy clander"}
but what I have is:
// found (3)
{id: 1, text: "foo", body: "jander"}
{id: 2, text: "bar", body: "clander"},
{id: 3, text: "foo bar", body: "jander crispy clander"}
Thanks in advance for any input.