elasticsearch/elasticsearch — Issue #1439: highlighting doesn't work with ip type
Author: fatagnus
Created: 2011-11-02 15:28:47+00:00
State: open

here is my mapping;

{
"dst": {
"type": "ip"
},
"srccountry": {
"type": "string",
"index": "not_analyzed"
}
}

and my query is :

{
"size": 1,
"query": {
"query_string": {
"query": "dst:192.168.1.100 srccountry:Indonesia",
"lowercase_expanded_terms": false,
"default_operator": "AND"
}
},
"highlight": {
"pre_tags": [
"< tag1 >",
"< tag2 >"
],
"post_tags": [
"< /tag1 >",
"< /tag2 >"
],
"fields": {
"dst": {},
"srccountry": {}
}
}
}
and highlight output is :

highlight: {
dst: [
< tag1 >< /tag1 >192.168.1.100 <==== PROBLEM
]
srccountry: [
< tag1 >Indonesia< /tag1 >
]
}
I think there is something that I missed with 'ip' type