You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2026/09/30 18:56:32 UTC

(solr) branch main updated: SOLR-18197: NestPathField: tolerate legacy maxCharsForDocValues arg (#4964)

This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 70c1a28995d SOLR-18197: NestPathField: tolerate legacy maxCharsForDocValues arg (#4964)
70c1a28995d is described below

commit 70c1a28995dd95ee23b6726f9aed81e2843de41f
Author: David Smiley <ds...@apache.org>
AuthorDate: Wed Sep 30 14:56:26 2026 -0400

    SOLR-18197: NestPathField: tolerate legacy maxCharsForDocValues arg (#4964)
    
    Co-authored-by: Claude Opus 5.5 <no...@anthropic.com>
---
 solr/core/src/java/org/apache/solr/schema/NestPathField.java   | 2 ++
 solr/core/src/test-files/solr/collection1/conf/schema-nest.xml | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/schema/NestPathField.java b/solr/core/src/java/org/apache/solr/schema/NestPathField.java
index bac7fa74997..082a9dd13d5 100644
--- a/solr/core/src/java/org/apache/solr/schema/NestPathField.java
+++ b/solr/core/src/java/org/apache/solr/schema/NestPathField.java
@@ -49,6 +49,8 @@ public class NestPathField extends StrField {
     args.putIfAbsent("docValues", "true"); // flip a default; necessary for old schemas
     args.putIfAbsent("multiValued", "false"); // flip a default; necessary for old schemas
     args.putIfAbsent("uninvertible", "false"); // flip a default; necessary for old schemas
+    // Schema API persisted this when NestPathField extended SortableTextField (Solr <= 9.10)
+    args.remove("maxCharsForDocValues");
     super.setArgs(schema, args);
     // Doesn't support these flags; perhaps others too.
     // note: we could support STORED if truly useful but why bother given docValues.
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-nest.xml b/solr/core/src/test-files/solr/collection1/conf/schema-nest.xml
index 86775a6c61c..94573d662cb 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema-nest.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema-nest.xml
@@ -41,7 +41,8 @@
 
   <fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
 
-  <fieldType name="_nest_path_" class="solr.NestPathField" />
+  <!-- Legacy attributes: as persisted by the Schema API in Solr 9.10 and earlier -->
+  <fieldType name="_nest_path_" class="solr.NestPathField" omitTermFreqAndPositions="true" omitNorms="true" maxCharsForDocValues="-1" multiValued="false" stored="false"/>
 
   <!-- Point Fields -->
   <fieldType name="int" class="solr.IntPointField"/>