Implement something like IN or LIKE or contains search with FacetFilters

I have a side filter in my project that uses the FacetFilter.
However FacetFilter searches on exact match but I need to implement something like IN or LIKE or contains search

Example

When I type Angular Universal . I should get results of all posts that have titles containing Angular or Universal or Both Angular Universal

Can anyone help me with this

Hello,

To be able to find all posts containing “Angular”, “Universal” or a combination of both (including typo tolerance) in their title attribute, then you need to define title in your searchableAttributes index configuration. This defines the list of attributes in your records that will be searched.

Once this is done, you can start typing in your main search bar and all results matching those keywords will be returned.

Is that what you had in mind? If you’d like to do a search into the list of current facets, I suggest you have a look at the Search For Facet Value feature instead.

Thanks for replying and for the help.
But the issue I have is that I want to search on particular field not the full database.

Example
In the top query search I type “certified”
In the side filter for title I type “Angular Universal”
I should get a result of blogs having title containing “Angular” or “Universal” or “Angular Universal” and all blogs should have a word “certified” any where in the blog

Below is the sample post request I am making . But it returns only blogs with title “Angular Universal” and containing certified.
blogs that contain only Angular or Universal do not come up

{“requests”:[{“indexName”:“blogs”,“params”:“query:[“certified”]
numericFilters:
hitsPerPage:10
page:0
typoTolerance:false
facetFilters:[“title:Angular Universal”]
facets:
tagFilters:”}]}

Oh I see.

Unfortunately, I don’t think this can be done. We don’t currently have a way to let you search for a specific keyword in a specific field. You can have typo-tolerance search only in the main search bar (query). Additional filtering using facets will be done with exact matches (exactly angular or universal), taken from your list of facet values.

The only two alternatives I can think of are:

  1. Splitting the words of your titles and making them facets, then using “Search For Facet Values” I linked earlier to let your users search into the list of facets. This will present your users with the list of potential keywords they can use to filter. They will have typo-tolerance in their search, but the UI might not be the best experience for them…

  2. Use only one search bar where your users should type “certified angular universal”, but if your keep title as the first element of your searchableAttributes it will always return results have matches in the title before elements having matches somewhere else. It’s not exactly what you asked for, but the results should be similar.

Sorry we don’t have exactly what you were looking for. If I think of another way to do it, I’ll update the thread.