lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Pellow <npel...@atlassian.com>
Subject NumericField with many, many values
Date Thu, 23 Jun 2011 05:39:25 GMT
Hi, 

I have a use-case where a single Document in Lucene contains a single NumericField that could
potentially have a 100s of 1000s of values.

Values are being added to a document instance like so:

        List<Fieldable> fields = .... // get fields, possibly 100s of 1000s with the
same name, but a different value
        for (Fieldable field : fields) {
            doc.add(field);
        }

Internally, doc adds the field to an ArrayList of Fieldables: List<Fieldable> .

This means there is quite a significant memory overhead for very large amounts of fields.

Has anyone toyed with the idea of storing the fields in Document in a map, keyed off Field
with the map-values being a list of values?
Or a new MultiValueField type, which contains an array of field values, rather than a single
value per Field ?

Are there any other known solutions or work-arounds for this problem ?

Cheers,
Nick
---------------------------------------------------------------------
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