You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2013/08/16 03:26:06 UTC
[jira] [Commented] (LUCENE-5178) doc values should allow
configurable defaults
[ https://issues.apache.org/jira/browse/LUCENE-5178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13741786#comment-13741786 ]
Robert Muir commented on LUCENE-5178:
-------------------------------------
I dont think lucene needs to do anything here. As i explained on LUCENE-5177 (but you refused to listen), you just have a separate numericdocvalues field just like fieldcache does (it has a separate bitset).
So you write a 1 there, when the document has a value for the field. Otherwise it will contain a 0 (because it gets filled with that).
This is very easy to do and will use ~ 1 bit per document just like fieldcache.
Then its just a matter of making it easy to pass this NumericDV to FIeldComparator (currently: it always pulls a Bits directly from FC). this can be something like:
{code}
if (ndv instanceof Bits) { // codec already specializes here
docsWithField = (Bits) ndv;
} else {
docsWithField = new Bits() {
boolean get(int index) {
return ndv.get(index) != 0;
}
}
{code}
> doc values should allow configurable defaults
> ---------------------------------------------
>
> Key: LUCENE-5178
> URL: https://issues.apache.org/jira/browse/LUCENE-5178
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Yonik Seeley
>
> DocValues should somehow allow a configurable default per-field.
> Possible implementations include setting it on the field in the document or registration of an IndexWriter callback.
> If we don't make the default configurable, then another option is to have DocValues fields keep track of whether a value was indexed for that document or not.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org