Keyword with special character

(srikanth) #1

Hi ,
Can Anyone help how to request ES to treat the words saparated with a special character as single word.
for e.g I have 100-01 in one of the column but when I try to search ES giving 100 & 01 both results.
I read about some word delimiter , but my data already available in ES and I want to manage this during Search.
Please help.

(David Pilato) #2

Change the mapping to be keyword instead of text. You need to reindex for that.

If you don't want to reindex, share the typical query you are running and the current mapping.

(srikanth) #3

thanks for the reply , Actually I was using Dynamic mapping and it is creating keyword field inside for each text field.however I am not able to utilize the keyword field as I am new to ES. I was facing same issue for distinct values aggregation as well. can you please help me on this.

(David Pilato) #4

So search using a Term query on field PartNumber.keyword.

(srikanth) #5

Thank you for reply @dadoonet

(system) closed #6

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