Hi - In ElasticSearch 0.19.4, if we issue a search request via the Java
API against an empty index with a sort field specified, eg
searchSourceBuilder.sort("foo"), an error is returned:
...Parse Failure [No mapping found for [foo] in order to sort on]]...
Since by definition an empty index will return an empty result set, it
should not be necessary to sort it? It may be better to simply return the
empty result set in this case - having to deal with the empty index case
complicates our client code, especially in tests, where we create the index
at startup and issue search requests against the empty index which we
expect to return an empty result set.