elasticsearch/elasticsearch — Issue #1438: highlighting doesn't work with ip type
Author: fatagnus
Created: 2011-11-02 15:27:22+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": [
"",
""
],
"post_tags": [
"",
""
],
"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