lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonghui Zhao <zhaoyong...@gmail.com>
Subject RE: NumericField traverse order
Date Thu, 22 Aug 2013 02:01:46 GMT
Got it,thanks
在 2013-8-21 下午10:03,"Uwe Schindler" <uwe@thetaphi.de>写道:

> Hi,
>
> It is numeric order according to the rules of Type#compareTo(Type) [Type =
> Integer, Long, Float, Double]. But be careful: unless the precision step of
> the numeric field is infinite, there are additional helper terms after the
> largest numeric value. You can differentiate them on the term prefix, but
> this is all internal stuff, not really public. Also, the terms are not
> human-readable.
>
> Uwe
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
> > -----Original Message-----
> > From: Yonghui Zhao [mailto:zhaoyonghui@gmail.com]
> > Sent: Wednesday, August 21, 2013 1:38 PM
> > To: java-user@lucene.apache.org
> > Subject: NumericField traverse order
> >
> > If we traverse a string field use code below, the value order is string
> older.
> >
> >     Terms terms = reader.terms(“strField");
> >     if (terms != null) {
> >       TermsEnum termsEnum = terms.iterator(null);
> >       BytesRef text;
> >       while ((text = termsEnum.next()) != null)
> >
> >
> > How about numeric field.  IntField, LongField, and DoubleField ....
> >
> > What's the order?   Numeric order?
> >
> > Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message