elasticsearch/elasticsearch — Issue #1437: highlighting doesn't work with ip type
Author: fatagnus
Created: 2011-11-02 15:22:35+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": "srccountry: Indonesia dst:192.168.1.100",
"lowercase_expanded_terms": false,
"default_operator": "AND"
}
},
"highlight": {
"fields": {
"srccountry": {},
"dst": {}
}
}
}

and highlight output is :

highlight: {
dst: [
192.168.1.100 < ==== PROBLEM
]
srccountry: [
Indonesia
]
}

I think there is something that I missed with 'ip' type