[
https://issues.apache.org/jira/browse/LUCENE-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12968451#action_12968451
]
Yonik Seeley commented on LUCENE-2649:
--------------------------------------
For the sort-missing-last type of functionality, the current comparator code
looks like this (see IntComparator for more context):
{code}
final int v2 = (checkMissing && !cached.valid.get(doc))
? missingValue : cached.values[doc];
{code}
And I was thinking of changing it to this:
{code}
int v2 = cached.values[doc];
if (valid != null && v2==0 && !valid.get(doc))
v2 = missingValue;
{code}
This should make the common case faster by both eliminating an unneeded
variable (checkMissing)
and checking that the value is the Java default value before checking the
bitset.
Thoughts?
> 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
> Assignee: 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]