Can the free text search match all terms


Can the free text search as detailed here

be configured to match all the terms (minus stop words used) - as detailed in the improving precision part of theelastic search document here

For instance if I do a search for cottages in belfast it returns a tonne of results with just cottages that we don't want to see

Many Thanks

Jul 22, 2014 16:00

I know that this a very old thread but I had a difficult time finding the answer to this same question. So I'm posting it here as this was the only thread I found while searching, hopefully when someone else finds this thread as I did, they'll get the answer.

Essentially we want to "AND" the search terms instead of the default "OR".

The way to do this is to use the "WithAndAsDefaultOperator()"-method after a method that returns an IQueriedSearch<T>, which For() does.

For example:

.For("cottages belfast")

This will only return results that match both "cottages" and "belfast".

Edited, May 25, 2016 10:25
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.