[ 
https://issues.apache.org/jira/browse/LUCENE-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910711#action_12910711
 ] 

Ryan McKinley commented on LUCENE-2649:
---------------------------------------

I like the idea of optionally caching the numdocs and unique values -- that 
would make sorting by this field faster -- the ArrayValues class could be 
easily augmented with this.

The problem with augmenting the Parser class as you suggest is that we would 
have to rejiggy everything that touches parser.  We would need different 
default classes for things that want or don't want the missing records.  How do 
we handle this big:
{code:java}
if (parser == null) {
        try {
          return wrapper.getIntValues(reader, field, DEFAULT_INT_PARSER);
        } catch (NumberFormatException ne) {
          return wrapper.getIntValues(reader, field, NUMERIC_UTILS_INT_PARSER); 
     
        }
      }
{code}
yuck


> 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
>            Reporter: Ryan McKinley
>             Fix For: 4.0
>
>         Attachments: 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]

Reply via email to