lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: IntField vs (IntDocValuesField + StoredField)
Date Wed, 31 Oct 2012 14:19:33 GMT
The DocValues field is better for sorting, as the values do not need to be uninverted. The
Field is already written to disk as a big int[] array, so sorting using SortField is faster
and less memory expensive because this structure can be used for sorting.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Ivan Vasilev [mailto:ivasilev@sirma.bg]
> Sent: Wednesday, October 31, 2012 2:43 PM
> To: LUCENE MAIL LIST
> Subject: IntField vs (IntDocValuesField + StoredField)
> 
> Hy Guys,
> 
> Is there some advantage in speed or index size to use this:
> 
> IntDocValuesField fld = new IntDocValuesField("fldName", 1); StoredField fld
> = new StoredField("fldName", 1);
> 
> instead of this:
> 
> IntField fld = new IntField("fld", 1, Field.Store.YES);
> 
> Searching, sorting and retrieving data from just one object (IntField) is easier
> than dealing with two objects (IntDocValuesField and
> StoredFiel) for the same field.
> So as Lucene includes the also latter alternative, there might be some
> advantages using it?
> 
> Cheers,
> Ivan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
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