[ https://issues.apache.org/jira/browse/SOLR-10047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981544#comment-15981544 ]
ASF GitHub Bot commented on SOLR-10047: --------------------------------------- Github user chatman commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/195#discussion_r113005049 --- Diff: solr/core/src/test/org/apache/solr/schema/DocValuesEnabledLaterTest.java --- @@ -0,0 +1,140 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.schema; + +import java.lang.invoke.MethodHandles; + +import org.apache.lucene.document.Document; +import org.apache.lucene.index.DirectoryReader; +import org.apache.lucene.index.DocValuesType; +import org.apache.lucene.index.FieldInfos; +import org.apache.lucene.index.LeafReader; +import org.apache.lucene.index.LeafReaderContext; +import org.apache.lucene.index.MultiFields; +import org.apache.solr.SolrTestCaseJ4; +import org.apache.solr.core.SolrCore; +import org.apache.solr.index.NoMergePolicyFactory; +import org.apache.solr.search.SolrIndexSearcher; +import org.apache.solr.util.RefCounted; +import org.junit.BeforeClass; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DocValuesEnabledLaterTest extends SolrTestCaseJ4 { + + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + @BeforeClass + public static void beforeTests() throws Exception { + initCore("solrconfig-basic.xml", "schema-docValues.xml"); + + // we need consistent segments that aren't re-ordered on merge because we're + // asserting inplace updates happen by checking the internal [docid] --- End diff -- Lets remove references to inplace updates here. > Mismatched Docvalue segments cause exception in Sorting/Facting; Uninvert per > segment > ------------------------------------------------------------------------------------- > > Key: SOLR-10047 > URL: https://issues.apache.org/jira/browse/SOLR-10047 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Reporter: Keith Laban > Assignee: Shalin Shekhar Mangar > Fix For: 6.6, master (7.0) > > Attachments: SOLR_10047_test.patch > > > The configuration of UninvertingReader in SolrIndexSearch creates a global > mapping for the directory for fields to uninvert. If docvalues are enabled on > a field the creation of a new segment will cause the query to fail when > faceting/sorting on the recently docvalue enabled field. This happens because > the UninvertingReader is configured globally across the entire directory, and > a single segment containing DVs for a field will incorrectly indicate that > all segments contain DVs. > This patch addresses the incorrect behavior by determining the fields to be > uninverted on a per-segment basis. > With the fix, it is still recommended that a reindexing occur as data loss > will when a DV and non-DV segment are merged, SOLR-10046 addresses this > behavior. This fix is to be a stop gap for the time between enabling > docvalues and the duration of a reindex. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org