You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "HoustonPutman (via GitHub)" <gi...@apache.org> on 2026/08/28 21:43:06 UTC

[I] Allow SortedNumericDocValues Updates when field is actually single valued [lucene]

HoustonPutman opened a new issue, #16580:
URL: https://github.com/apache/lucene/issues/16580

   ### Description
   
   Under the hood, if a `SortedNumericDocValues` field is actually single-valued, then Lucene will store it as a single-valued `NumericDocValues` field and then wrap it to look like a SortedNumericDocValues field when accessed. Therefore, even though the utility classes `DoubleField`, `FloatField`, `LongField` and `IntField` use `SortedNumericDocValues` under the hood, these classes are still great when used with single-valued fields. For doubles and floats in particular, the sorted nature of the docValues representation make range queries better. (See https://github.com/apache/lucene/issues/16573 for one such reason)
   
   One big issue when changing to use this for single-valued fields is that you lose the ability to do docValues updates. There should be no issue supporting updates to single-valued `SortedNumericDocValues`, since ultimately it is a wrapped `NumericDocValues` (which supports updates).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [I] Allow SortedNumericDocValues Updates when update is actually single valued [lucene]

Posted by "HoustonPutman (via GitHub)" <gi...@apache.org>.
HoustonPutman closed issue #16580: Allow SortedNumericDocValues Updates when update is actually single valued
URL: https://github.com/apache/lucene/issues/16580


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [I] Allow SortedNumericDocValues Updates when update is actually single valued [lucene]

Posted by "HoustonPutman (via GitHub)" <gi...@apache.org>.
HoustonPutman commented on issue #16580:
URL: https://github.com/apache/lucene/issues/16580#issuecomment-5515371768

   When making the PR, it became clear that supporting single-valued updates of multi-valued SortedNumericDocValues was a super-set of the original problem, and wasn't that much more complicated to support.
   
   Supporting multi-valued updates will be left for a future enhancement, but the current implementation will be sure to make sure that back-compat will be easy when multi-value updates are added. Nothing on disk for SortedNumericDocValues will assume single valued updates, just in the code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org