Hi There !
Got a little problem with geo_point type.
I have lot of data with geo_point informations indexed like this :
"iplocation" : [
{
"ip" : "92.89.xx.xx",
"location" : {
"lat" : 48.86,
"lon" : 2.35
}
}
],
Here is my mapping :
"iplocation" : {
"properties" : {
"ip" : {
"index" : "not_analyzed",
"type" : "string",
"doc_values" : true
},
"location" : {
"type" : "geo_point"
}
}
},
If i make a query on geo_point, everything works fine.
I want to trace in map all points (with markers). I can not get the whole
document, because they are too heavy. So i used the fields instruction. It
seems not to work :
{
"query": {
"bool": {
"must": {
"range": {
"urls.date": {
"gte": "now-1h"
}
}
}
}
},
"fields": [
"iplocation.location."
],
"sort": [
{
"date": {
"order": "desc"
}
}
],
"size": 100
}
Gives me documents like this :
{
"_index" : "myindex",
"_type" : "mytype",
"_id" : "AUzHkxQ9mTOfL8aT3Pgt",
"_score" : null,
"sort" : [
1429285738976
]
},
So i tried to use script fields :
{
"query": {
"bool": {
"must": {
"range": {
"urls.date": {
"gte": "now-1h"
}
}
}
}
},
"script_fields": {
"geo": {
"script": "doc['iplocation.location'].value"
}
},
"sort": [
{
"date": {
"order": "desc"
}
}
],
"size": 10000
}
It worked, but for some shards, i obtain this error :
RemoteTransportException[[Tarsal][inet[/5.196.81.111:9300]][indices:data/read/search[phase/fetch/id]]];
nested: IOException[Can't write type [class
org.elasticsearch.common.geo.GeoPoint]];
And i don't have all data in result.
Does someone have an idea of what i can do ?
Thanks a lot for your help !
Thierry
--
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/c30d57dc-6c89-4b0d-ba75-1b885d58811c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.