lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Exception: cannot determine sort type
Date Thu, 23 Dec 2004 08:55:30 GMT

On Dec 22, 2004, at 11:25 PM, Kauler, Leto S wrote:
> "java.lang.RuntimeException: no terms in field Title_Sort - cannot
> determine sort type"
>
> Title_Sort is a sort-specific field (Store=false, Index=true,
> Tokenise=false).  I do not have access to the actual Lucene-calling
> code, but I do not believe that the creation of the SortField defines a
> type (so just defaults to AUTO).

The issue occurs if the first field it accesses parses as a numeric 
value and then successive fields are String's.  If you are mixing and 
matching numeric and text information in this Title_Sort field you 
should specify the type.

> We could specify the sort type as String but we do have some Date 
> fields
> too.  Are dates actually indexed as strings?

You're putting dates into Title_Sort also?  The type is specific to a 
sort field, so you can sort by dates too but you'd use a different 
field and a different type.

*Everything* in Lucene is indexed as a string.  But how a date looks as 
a string is a topic unto itself.  I prefer to use YYYYMMDD as a date 
formatted as a string (but when sorting, this could be treated as a 
numeric).

> I am wondering why this exception might occur when the server/index is
> under load.  I do realise there are many 'variables in the equation', 
> so
> there probably is not an easy answer to this.

I'm at a loss on this one without further details, thats for sure.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message