Skip to content

Instantly share code, notes, and snippets.

@bryangreen
Created February 13, 2012 21:29
Show Gist options
  • Save bryangreen/1820642 to your computer and use it in GitHub Desktop.
Save bryangreen/1820642 to your computer and use it in GitHub Desktop.
Getting ClassCastException[org.elasticsearch.search.controller.ShardScoreDoc cannot be cast to org.apache.lucene.search.FieldDoc]
The "permission" item type exists on the system and library indexes. It does not exist on the 'kk' index.
curl -XPOST "http://localhost:9200/system,library,kk/permission/_search" -d {
"from": 0,
"size": "20",
"sort": [
{
"title": {
"ignore_unmapped": true
}
}
]
}
{"error":"ReduceSearchPhaseException[Failed to execute phase [fetch], [reduce] ]; nested: ClassCastException[org.elasticsearch.search.controller.ShardScoreDoc cannot be cast to org.apache.lucene.search.FieldDoc]; ","status":500}
Works fine when the sort is removed from the query.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment