lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: Exception raised when searching with sorting on an empty index.
Date Sun, 20 Aug 2006 15:07:33 GMT
On 8/18/06, Mathias Herberts <> wrote:
> When doing a search with sorting on a field (ts) on the MultiSearcher
> with an empty RAM based index, an exception is thrown saying:
> no terms in field ts - cannot determine sort type

If you specify the type of sort you want, this shouldn't happen.
Letting Lucene guess the type (AUTO) shouldn't be done in a production
environment IMO.

Thinking about it though, I'm not sure why we need an exception thrown
in the case where there are no fields... that means all docs are equal
and we can simply select a string sort.

This made me thing of another failure mode for AUTO sorting (besides
guessing wrong or not having documents with that field)... a different
type could be guessed for different subsearchers.

-Yonik Solr, the open-source Lucene search server

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message