Created
July 19, 2011 14:41
-
-
Save anonymous/1092581 to your computer and use it in GitHub Desktop.
Failing mvel/geopoint array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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