Skip to content

Instantly share code, notes, and snippets.

Created July 19, 2011 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1092581 to your computer and use it in GitHub Desktop.
Save anonymous/1092581 to your computer and use it in GitHub Desktop.
Failing mvel/geopoint array
// Query:
{
"query":{
"match_all":{}
},
"script_fields":{
"test1":{
"script":"i = 0; n = 0; d = 0; if (doc['locs'].values.length > 0) { d = doc['locs'].lons[i]; } d;"
}
},
"fields":["locs",
"test1"
]
}
// Error (from elasticsearch-head):
{
* took: 13
* timed_out: false
* _shards: {
o total: 5
o successful: 4
o failed: 1
o failures: [
+ {
# reason: RemoteTransportException[[Bizarnage][inet[/10.194.17.235:9300]][search/phase/fetch/id]]; nested: RuntimeException[cannot invoke getter: getLons [declr.class: org.elasticsearch.index.mapper.xcontent.geo.GeoPointDocFieldData; act.class: org.elasticsearch.index.mapper.xcontent.geo.GeoPointDocFieldData] (see trace)]; nested: ClassCastException[[D cannot be cast to [Ljava.lang.Object;];
}
]
}
* hits: {
o total: 198
o max_score: 1
o hits: [ ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment