I am trying to come up with a query for elastic search to search for strings with hiphen and dots example : "PN-8100.0500-070, PN-8100.0500, PN-8100.0500-180". The search should be able to match exact strings like "PN-8100.0500-070" or "PN-8100.0500" in the above example. Note : The example string is a single field in elasticsearch index.
I tried using the query string with minimum match set to 100%, but it doesn't quite do complete match on the string (it returns entries with PN-8100.0500 as well).
Would it help if I store the comma separated string as string array and search using keyword analyzer.?
Any suggestions would be greatly appreciated. Thanks