Multiple Words in Search

I’m attempting to pass blocks of text as a search term and hoping to configure it to return matches, but in those case I must have index configured to not return results in those cases. Not sure how to configure this for my special case. Normally this is the desired behavior.

To use a baseball analogy.

If I pass “Hank Aaron Babe Ruth Joe Dimagio” I get no results.

I have:

name
lastname
property (key pair data)

as custom ranking attributes from my docs.

Any help would be appreciated…

Dean

Hi Dean,

Thanks for reaching out!

By default you have to know that Algolia considers all the words from the query as mandatory. In your case, that means that a single record must contain all the words you typed, if one is missing, the records is not considered as a match.

You may want to modify the removeWordsIfNoResults setting, you can find some documentation here.

Regards,

Hi Leo,

I finally got to try your suggestion. Unfortunately it did not fix my problem. The search terms seems to have to be contained in the same document. Even when I enable the full “OR” switch.

I’m hoping to get all the docs that “some” or all of those search terms.

Any thoughts?

Thanks in advance.

Dean

Hi Dean,

What you are describing is the exact behavior of "allOptional" value of "removeWordsIfNoResult".
I would advise contacting our support at support@algolia.com for us to investigate further.

Regards,

1 Like