Prioritize text search

Hello,

Is there “Text Search Order” functionality like “nlpFilterOrder” ?Breaking Ties in NLP Filters - nlpFilterOrder

Our partner faces a lot of not-relevant answers, so they want to prioritize text search fields too.

Hey Yukio,

Currently there is no way to explicitly weight text search matches on one field higher than another field. There should be lots of other ways to improve the precision of your results, though. Are there any specific problems you’re seeing?

It’s hard for me to provide recommendations without knowing more about your issue. But one general thing you might consider is using phraseMatch in place of textSearch. Phrase match requires a complete match of an entire phrase, so it can be more precise than using just textSearch.

Best,
Max

Hi @Max_Davish ,
I’m also curious if a TextSearchOrder is on the roadmap and if there’s value in implementing it!

@Manpreet_Dhindsa and I are having trouble with a client account where the client wants to prioritize the relevance of the field name > address.line1 field in the results (i.e. name match appears above address line match), so I set up the following:

This seems to work for name related queries, but it has appeared to backfire for address searches, and does not show the top matching address even though it’s set to phrase match. Do you have any idea why this might be the case? Thank you!

1 Like

Hey Hannah,

At the moment we don’t have a concept of textSearchOrder and it isn’t on our immediate roadmap. But this is valuable feedback and it’s definitely something we’ll consider adding in the future.

Regarding your particular problem, I noticed that you only have phrase match activated on the address field. This means that unless the user’s query contains the entire Address 1 field, nothing will happen. So in your example, the field value is “4525 West Wabash Avenue”, but the user’s query is just “4525 Wabash Avenue”, so it’s not a match.

Could you try activating text search on the address field as well? That might help solve this problem and improve recall.

Hope this helps!

Hi @Max_Davish ,

Similar to Hannah’s post above, I was also wondering if there are any workarounds to prioritizing different phrase match searchable fields without there being a “Text Search Order” or “Phrase Match Order” functionality, similar to “nlpFilterOrder”.

The context is that currently, my client has two fields “Sales Team” and “Division” that are being phrase matched. “Sales Team” match should have a higher priority (e.g. an entity with a matching Sales Team should be prioritized in search results over an entity with a matching Division), so I’ve added a query rule for each Sales Team where if the search term contains the specified Sales Team, we boost the entities in the corresponding Sales Team saved filter that has been set up. This setup has returned all results as expected so far, but if the client were to add a third, fourth, and so on phrase match searchable fields that should be prioritized in a specific order, is there any way we can setup this logic in the backend configuration/best practice? Thank you so much!

1 Like

Hi Jamie,

Unfortunately we do not have a good way to prioritize multiple phraseMatch fields based on a specific ordering. This is definitely valuable feedback for our roadmap though, feel free to submit on the Ideas board if this is something you’d like to see us implement!