I have tw
Highlighter doesnt highlight fields of type of double /long
Here is the index mapping and search request with highlight enabled
Index field mapping is below
mappings": {
- "document": {
- "dynamic_templates": [
- {
- "multi": {
- "mapping": {
- "type": "multi_field",
- "fields": {
- "{name}_raw": {
- "index": "not_analyzed",
- "type": "{dynamic_type}"
},
- "{name}": {
- "index": "analyzed",
- "type": "{dynamic_type}"
}
}
},
- "{name}_raw": {
- "match": "multi_*"
}
},
- "mapping": {
- "multi": {
- {
- "number": {
- "mapping": {
- "index": "not_analyzed",
- "type": "{dynamic_type}"
},
- "match": "n0*"
}
}
],
- "mapping": {
- "number": {
- {
- "properties": {
- "id": {
- "type": "string"
},
- "type": "string"
- "text": {
- "type": "string"
},
- "type": "string"
- "rank": {
- "type": "double"
},
- "type": "double"
- "path": {
- "type": "string"
},
- "type": "string"
- "createdDateTime": {
- "format": "dateOptionalTime",
- "type": "date"
},
- "dcn": {
- "type": "string"
},
- "type": "string"
- "fields": {
- "properties": {
- "s2_StringSort3": {
- "type": "string"
},
- "type": "string"
- "BegDoc#": {
- "type": "string"
},
- "type": "string"
- "DocID": {
- "type": "string"
},
- "type": "string"
- "EMail_Subject": {
- "type": "string"
},
- "type": "string"
- "Filename": {
- "type": "string"
},
- "type": "string"
- "OCRPath": {
- "type": "string"
},
- "type": "string"
- "Filesize": {
- "type": "string"
},
- "type": "string"
- "multi_DateSort2": {
- "type": "string",
- "fields": {
- "multi_DateSort2_raw": {
- "index": "not_analyzed",
- "type": "string"
}
}
},
- "multi_DateSort2_raw": {
- "DateSent": {
- "type": "string"
},
- "type": "string"
- "s1_StringSort3": {
- "type": "string"
},
- "type": "string"
- "multi_StringSort2": {
- "type": "string",
- "fields": {
- "multi_StringSort2_raw": {
- "index": "not_analyzed",
- "type": "string"
}
}
},
- "multi_StringSort2_raw": {
- "DateRcvd": {
- "type": "string"
},
- "type": "string"
- "From": {
- "type": "string"
},
- "type": "string"
- "multi_DoubleSort1": {
- "index": "analyzed",
- "type": "double",
- "fields": {
- "multi_DoubleSort1_raw": {
- "type": "double"
}
}
},
- "type": "double"
- "multi_DoubleSort1_raw": {
- "BegAttach": {
- "type": "string"
},
- "type": "string"
- "n0_NumSort3": {
- "type": "long"
},
- "type": "long"
- "n0_NumSort4": {
- "type": "long"
},
- "type": "long"
- "multi_NumSort2": {
- "index": "analyzed",
- "type": "long",
- "fields": {
- "multi_NumSort2_raw": {
- "type": "long"
}
}
},
- "type": "long"
- "multi_NumSort2_raw": {
- "multi_NumSort1": {
- "type": "string",
- "fields": {
- "multi_NumSort1_raw": {
- "index": "not_analyzed",
- "type": "string"
}
}
},
- "multi_NumSort1_raw": {
- "n0_DoubleSort3": {
- "type": "double"
},
- "type": "double"
- "To": {
- "type": "string"
},
- "type": "string"
- "n0_DoubleSort2": {
- "type": "double"
},
- "type": "double"
- "DateCreated": {
- "type": "string"
},
- "type": "string"
- "ConversationIndex": {
- "type": "string"
},
- "type": "string"
- "d0_DateSort3": {
- "format": "dateOptionalTime",
- "type": "date"
},
- "NativeFile": {
- "type": "string"
},
- "type": "string"
- "s3_StringSort3": {
- "type": "string"
}
}
}
}
}
- "type": "string"
- "s2_StringSort3": {
- "properties": {
- "id": {
- "dynamic_templates": [
am doing search with the query ="n0_DoubleSort2:"67884.18"" request with
highlight enabled but I dont get any highlights in return
Can some one tell me if am doing some thing wrong
{
"from": 0,
"size": 1,
"highlight": {
"fragment_size": 0,
"number_of_fragments": 1,
"fragment_offset": 50,
"fields": {
"*": {
"order": "score",
"require_field_match": true
}
}
},
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "n0_DoubleSort2:"67884.18"",
"fields": [
"_all"
]
}
}
]
}
}
}
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/294c831e-b431-4825-aa7a-e3d7aff478fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.