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: RuntimeException: cannot determine sort type!
Date Wed, 16 Jun 2004 16:15:29 GMT
On Jun 16, 2004, at 12:09 PM, iouli.golovatyi@group.novartis.com wrote:
> thank You very much, I tried it and it looked like it really fixed the
> problem.

*whew*

> If "modified" is only there for sorting and not for querying, perhaps
> index it as a Integer.toString or Float.toString instead - this will
> give you better resource usage and performance most likely - and change
> the type to SortField.INT or SortField.FLOAT appropriately.  The
> sorting infrastructure can detect a type, but it may have issues doing
> so if the strings look like a number in the first document but later
> appear like a String.  DateField.timeToString makes them String, so
> forcing it to sort on String type should work.
>
>
> This field is used mostly for sorting, but I'm going to use it for 
> query as
> well
> just get the end user possibility to see the incoming data in real 
> time,
> i.e. modified[timefrom TO timeto]
> I used this format because I sow it doc doing like this. Should I 
> really
> change to numbers?

If you are going to query on it, you cannot change it to a numeric... 
it has to remain a lexicographically orderable String.  See the wiki 
for other info on date fields, like using YYYYMMDD String instead of 
the DateField methods.

	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