Highlighting and Word delimiter


(Siva Shanmuga Subramanian Murugan) #1

I am facing a strange issue with the combination using word delimiter and highlighter.

I have a String field named model_name which is analyzed at the field level using word delimiter tokenizer at both index and search time.
I have 2 other field named style_name, vin_no.

Sample Data
model_name : Silverado 2500HD
Style : Sedan 4 dr
vin_no : JTHKD5BH4F2236174

When i search my mapping with the vin no "JTHKD5BH4F2236174", it matches the record as expected but while highlighting it highlights Style along with vin_no. In the style field it matches the character 4.

I know word delimiter splits the number and characters respectively but since i have it as a field level analyzer wont that be applied only to the model_name field, how is elastic search really highlighting the style field


(Siva Shanmuga Subramanian Murugan) #2

Have a theory can someone validate it, in a search execution querying and highlighting are 2 separate process.

ES finds the matched documents based on the search term and on the resultant dataset it applies all the search token to identify the fields to highlight.

Even though while searching ES applies analyzer to the mapped field alone but it gathers the all the newly formed search token and re run it against matched documents to highlight the dataset

is this right?


(system) #3