Partial & Exact Search on data with "-"


#1

We having the following data in documents:
"abc-xyz-000"
"abc-xyz-123-000"
"abc-xyz"

When user searches with "abc" & "abc-xyz" all 3 documents needs to be returned.

What analyzer should be used?
Sample Query Below
{
"query": {
"multi_match": {
"query": "abc-xyz",
"type": "cross_fields",
"operator": "and",
"fields": [ "first_name", "last_name" ]
}
}
}


(system) #2