How to handle search query with both words and numbers

(Karoline Brynildsen) #1

How can I handle search queries that might contain both words and numbers (typically a year, but it can also be a paragraph, chapter etc) in a good way?

The issue is that if a user search for "taxes 2017" they will get hits in documents that contains only "taxes" but also only "2017". Now, hits in documents that only contains the word "taxes" makes sense and is ok, but hits in documents that contains only "2017" makes no sense at all. Is there a way to tell elasticsearch that numbers only have a meaning in combination with one or several words, but not by it self?

How to know if search query contains numbers
(Karoline Brynildsen) #2

Nobody knows? :cry:

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.