Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terms facet on an IP field returns terms as numbers, not IPs #678

Closed
jordansissel opened this issue Feb 9, 2011 · 3 comments
Closed

terms facet on an IP field returns terms as numbers, not IPs #678

jordansissel opened this issue Feb 9, 2011 · 3 comments

Comments

@jordansissel
Copy link
Contributor

Fiddling with the facet APi tonight. Found that a facet term query on a field that is an IP address ends up coming back with the 'term' as a string number, not the actual IP address in dotted notation.

My query:

'{"size":1, "query": { "query_string": { "query": "clientip:*" } }, "facets": { "foo": { "terms": { "field": "clientip", "size": 4 } } } }

Results:
{
...
"_source" : {..., clientip":["76.21.79.138"] ... }
...
"facets" : {
"foo" : {
"_type" : "terms",
"_field" : "clientip",
"terms" : [ {
"term" : "1136881900",
"count" : 12375
}, {
"term" : "3497226231",
"count" : 4223
}, {
"term" : "1123633115",
"count" : 3215
}, {
"term" : "1600953340",
"count" : 2312
} ]
}
}
}

@jordansissel
Copy link
Contributor Author

this is observed in 0.14.1, haven't tried other versions.

@kimchy
Copy link
Member

kimchy commented Feb 9, 2011

Right, I will push a fix for this. Note that in master (0.15) the ip type is no longer dynamically applied.

@kimchy
Copy link
Member

kimchy commented Feb 9, 2011

terms facet on an IP field returns terms as numbers, not IPs, closed by b26d862.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants