lucene-java-user mailing list archives

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

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

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 ?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message