[Elasticsearch] Searching a word which has hyphen ( i.e. - ) in the middle of it, returns no results

Hey ,

In our company we use a serial number scheme to uniquely identify the case. We put this serial number in the beginning of the title of every invoice.
This scheme is in the form of CASE24-1234
where 24 is the year number and 1234 is an incrementing number.

The Elasticsearch engine doesn’t seem to like it very much. Searching for CASE24 would bring up all the invoices of cases from 2024, and searching for 1234 would bring all the cases 1234 from all years. However when searching for CASE24-1234 it doesn’t give any result, even if such an invoice exist.

Does somebody else encounter this problem ? Did somebody find a solution ?

Thanks a lot

Check some examples:

Hey rsp,

Thanks for the answer. However I meant if there is a way to tweak this behavior such that the hyphen would be treated as normal character by default ?