lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mindaugas Žakšauskas <min...@gmail.com>
Subject Re: NumericField API
Date Tue, 01 Jun 2010 13:34:20 GMT
Hi,

Thanks for your reply Uwe. Just a couple of notes:

>> In order to get rid of this exception, I had to change one of the
> following:
>> - SortField must be changed from SortField.STRING to SortField.LONG
>
> This does the trick and is *not* weird. You are using *numeric* fields, so
> you cannot sort as lexical *terms/strings*

Fair enough. I don't know if this is easily doable, but maybe it would
be worth changing the exception text to be a bit more readable?
Because I had to spend a fair amount of time digging into
"creationDate field has become tokenized? How could that happen for
numeric fields?" direction. As from your answer - all that matters in
this case is the sorting rather than indexing.

> The above exception may be caused by something different: Can it be that you
> have an old index that already had non-NumericField documents in it? If this
> is so, you have a mixed field contents and then behavior of range query and
> sort is wrong.

I have completely reindexed all documents so this clearly isn't the case.

>
>> 3) NumericField API is marked as experimental and volatile
>> (http://lucene.apache.org/java/3_0_1/api/core/index.html). Is there any
>> other "stable" API I can rely on in Lucene 3.0? If not, what would be
> possible
>> NumericField replacement I could use now?
>
> "Experimental" in Lucene's API *only* means that the API (method signatures,
> classes) may change suddenly. The features are tested and working.

My point was - I totally understand that a piece of API could have
been made deprecated and  replaced with something else. That's the
life we're living. But would it not then make sense to replace it with
something else which is also reasonably stable (in terms of API)?

Because developers aren't left with many options now - they have to
convert from using one API which is unavailable to another which is
likely to change rather sooner than later. It's just an early
observation as historically Lucene has been doing an amazing job in
terms of API stability.

Regards,
Mindaugas

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


Mime
View raw message