[
https://issues.apache.org/jira/browse/LUCENE-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ryan McKinley updated LUCENE-2649:
----------------------------------
Attachment: LUCENE-2649-FieldCacheWithBitSet.patch
Here is a new patch that incorporates most of the ideas we have discussed. I
tried addressing the larger issue of the FieldCache mess in LUCENE-2665, but
that is too big to tackle in one go. After getting something to *almost* work
for LUCENE-2665, I then just took the EntryCreator stuff and am adding that to
'LUCENE-2649'
As such, some of the choices about how EntryCreator works are based on future
plans, and my feel akward today. Speciffically:
1. In the future, a Cache on the IndexReader should not necessarily be tied to
a field name. To do this, the field name parameter should be part of the
EntryCreator. In this first pass, we will need to pass the field name twice:
{code:java}
IntValues vals = cache.getInts(reader, "fieldName", new IntValuesCreator(
"fieldName", parser, flags ) )
{code}
I think the tradeoff is OK, and makes fewer changes in the future.
2. In the future, the EntryCreator.getCacheKey() should be the only key stored.
To fall within the existing structure, the entire EntryCreator is stored on
the 'custom' field on the internal cache, but the equals and hashCode values
are bubbled up. This makes more sense for LUCENE-2665. For now we need to be
careful that the EntryCreator classes are reasonable things to store as Keys
(it includes the Parser, etc)
-----------------------------
I added a bunch of tests to exercise how sequential calls with different
options behave.
I think this patch is ready to commit to /trunk -- when it is in, I'll make a
patch for LUCENE-2665.
Since /trunk is now a bit more experimental, and I feel pretty good about the
feedback this has had I will probably jump the gun and commit soon
> FieldCache should include a BitSet for matching docs
> ----------------------------------------------------
>
> Key: LUCENE-2649
> URL: https://issues.apache.org/jira/browse/LUCENE-2649
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Search
> 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, 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: [email protected]
For additional commands, e-mail: [email protected]