You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "serhiy-bzhezytskyy (via GitHub)" <gi...@apache.org> on 2026/08/19 14:16:56 UTC
[PR] SOLR-18379: remove DocsStreamer.KNOWN_TYPES for the ExternalizeStoredValuesAsObjects marker [solr]
serhiy-bzhezytskyy opened a new pull request, #4758:
URL: https://github.com/apache/solr/pull/4758
Replaces `DocsStreamer.KNOWN_TYPES` (16 classes, exact equality) with the `ExternalizeStoredValuesAsObjects` marker (`instanceof`) on 10 base types — the 5 `Trie*Field` and `DenseVectorField` inherit it from their parents, so 16 types end up covered by 10 declarations. Landed as two commits: the first pins today's stored-value output for the quantized vector fields (values that were never actually verified before, per a throwing control), the second does the swap so those same pins catch any drift.
Despite touching 15 files, most give identical output either way: `StrField`/`TextField` (and `UUIDField`, inheriting from `StrField`) don't override `toObject(IndexableField)`, so it already delegates to `toExternal` — the marker changes nothing for them. Only two real behaviour changes: quantized dense-vector fields now return numbers instead of strings (repairs an inconsistency with their own superclass), and `BinaryField` test subclasses (`StrBinaryField`, `SwapBytesBinaryField`, `SortableBinaryField`) lose their string form since `BinaryField.toObject` returns `ByteBuffer`, which no subclass can override back to `String`.
Zero remaining references to `KNOWN_TYPES`. 59 tests across `DocsStreamerTest`, `TestBinaryField`, `ScalarQuantizedDenseVectorFieldTest`, `DenseVectorFieldTest` — 0 failures.
AI-assisted (Claude Sonnet 5)
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18379: remove DocsStreamer.KNOWN_TYPES for the ExternalizeStoredValuesAsObjects marker [solr]
Posted by "serhiy-bzhezytskyy (via GitHub)" <gi...@apache.org>.
serhiy-bzhezytskyy commented on code in PR #4758:
URL: https://github.com/apache/solr/pull/4758#discussion_r3828498627
##########
solr/core/src/java/org/apache/solr/schema/DatePointField.java:
##########
@@ -98,7 +98,8 @@
*
* @see PointField
*/
-public class DatePointField extends PointField implements DateValueFieldType {
+public class DatePointField extends PointField
Review Comment:
Yes, deliberately -- `instanceof` means subclasses inherit trust (old `KNOWN_TYPES` used exact-class equality). `UUIDField extends StrField` without overriding `toObject`, so it still returns a `String` -- safe.
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18379: remove DocsStreamer.KNOWN_TYPES for the ExternalizeStoredValuesAsObjects marker [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4758:
URL: https://github.com/apache/solr/pull/4758#issuecomment-5551498869
While this is a removeal of deprecation, the way it works adds a new interface... Which I really don't have a strong sense of "is this right or not" approach... Again, one of the areas where I am maybe less comfortable saying "this is the right path forward".
Would you be willing to send an email to dev@ mailing list with a short summary and get peoples thoughts on the use of the marker interface? If the approach is one folks like, then this looks great.
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18379: remove DocsStreamer.KNOWN_TYPES for the ExternalizeStoredValuesAsObjects marker [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #4758:
URL: https://github.com/apache/solr/pull/4758#discussion_r3825931526
##########
solr/core/src/java/org/apache/solr/schema/DatePointField.java:
##########
@@ -98,7 +98,8 @@
*
* @see PointField
*/
-public class DatePointField extends PointField implements DateValueFieldType {
+public class DatePointField extends PointField
Review Comment:
so, this ends up being more intrusive because we are now implementing `FieldType.ExternalizeStoredValuesAsObjects`..... Maybe that is okay?
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18379: remove DocsStreamer.KNOWN_TYPES for the ExternalizeStoredValuesAsObjects marker [solr]
Posted by "serhiy-bzhezytskyy (via GitHub)" <gi...@apache.org>.
serhiy-bzhezytskyy commented on PR #4758:
URL: https://github.com/apache/solr/pull/4758#issuecomment-5546455643
@epugh anything else I should fix here?
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18379: remove DocsStreamer.KNOWN_TYPES for the ExternalizeStoredValuesAsObjects marker [solr]
Posted by "serhiy-bzhezytskyy (via GitHub)" <gi...@apache.org>.
serhiy-bzhezytskyy commented on PR #4758:
URL: https://github.com/apache/solr/pull/4758#issuecomment-5551977250
The marker isn't new — `FieldType.ExternalizeStoredValuesAsObjects` is Hoss's, from SOLR-18033 back in January (`90ef6ff725d`), and `DocsStreamer` on main already checks it next to `KNOWN_TYPES`. `KNOWN_TYPES` itself is `@Deprecated(since = "10.1")` and its javadoc says "new field types should not be added to this list, instead use ExternalizeStoredValuesAsObjects". So this PR removes the deprecated half of a mechanism that's already dual, rather than proposing a new one — my description didn't say the interface pre-existed, which is on me. I can still take it to dev@ if you want the wider read.
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org