Searchkick Elasticsearch - How to use operator - and/or for phrase queries?

Viewed 278

Let's say I have the following query string that the user enters - "white shoes and water washable"

Basically I want to search for both "white shoes" and "water washable" in my product_description field which is defined as searchable. How do I do that?

And also the same goes for "white shoes or water washable", so instead of "and" operator, use a "or" operator.

I was hoping to do something like the following but doesn't seem to work??

Product.search ["white shoes", "water washable"], match: :phrase, operator: "and/or"

Thanks.

0 Answers
Related