lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Commented: (LUCENE-2649) FieldCache should include a BitSet for matching docs
Date Wed, 22 Sep 2010 18:22:34 GMT


Uwe Schindler commented on LUCENE-2649:

I think it should be a separate entry in the cache. Only that its only regenerated, if it
does not already exist for the field/IR combination. So there are these combinations:

- cache is purged (inititially)
- user calls getBytes(field) -> bytes[] is filled, also the Bits
- user calls additionally getInts(field) for some reason -> int[] is filled, but as Bits
already exit they dont need to be filled
- user calls getBits(field) -> returns the pre-filled bits from one of the previous calls


- Cache is purged (initially)
- User calls getBits(field), there are no bits available until now, bits are populated from
TermEnum/TermDocs, but no byte[] or int[], as not requested

With a config option, one could switch automatic polulation of Bits off, so in the first combination,
only the last call to getBits() would populate bit set.

I all cases this is easily possible by having a separate cache with separate population method
for the bits. If some method like getBytes() also populates the Bits, it should simply add
the created Bits manually to the cache.

Does this sound like a plan?

> FieldCache should include a BitSet for matching docs
> ----------------------------------------------------
>                 Key: LUCENE-2649
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>             Fix For: 4.0
>         Attachments: LUCENE-2649-FieldCacheWithBitSet.patch, LUCENE-2649-FieldCacheWithBitSet.patch,
LUCENE-2649-FieldCacheWithBitSet.patch, LUCENE-2649-FieldCacheWithBitSet.patch, LUCENE-2649-FieldCacheWithBitSet.patch
> The FieldCache returns an array representing the values for each doc.  However there
is no way to know if the doc actually has a value.
> This should be changed to return an object representing the values *and* a BitSet for
all valid docs.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message