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

Michael McCandless commented on LUCENE-2649:
--------------------------------------------

I like where this all is going!!  We can finally fix FC!!

bq. In my opinion, the field cache's public API should not look different from 
CSF, so one can simply also sort against a CSF.

+1

>From the consumption standpoint, they (FC and CSF) really ought to be
one and the same.

What's "unique" about FieldCache is that it derives its values via
uninversion... this is nice because there's no index change, but it's
slow at reader open time.  It's also error-proned (you may hit
multiple values per doc, these values may have gone through analysis,
etc.)

CSF, instead, actually computes the values during indexing and stores
the raw, pre-computed array, in the index.

They are both just different sources for the same thing.

Also, an app should be free to plugin its own external source, and it
should present this same "values source" API.

bq. Uwe, I think we need to keep the native arrays.

I think the API should allow for optional retrieval of the backing
array (and we should [manually, for today] specialize the sort
comparators), but primary access should be a method call eg
ByteValues.getValue(int docID).


> 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
>
>
> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to