You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2019/09/05 19:11:57 UTC
[lucene-solr] branch master updated: LUCENE-8917: Fix Solr's
TestCodecSupport to stop trying to use the now-removed Direct docValues
format
This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new 2552986 LUCENE-8917: Fix Solr's TestCodecSupport to stop trying to use the now-removed Direct docValues format
2552986 is described below
commit 2552986e8722e1e68cdde6a98ca9173d8c5341f2
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Thu Sep 5 12:11:49 2019 -0700
LUCENE-8917: Fix Solr's TestCodecSupport to stop trying to use the now-removed Direct docValues format
---
.../core/src/test-files/solr/collection1/conf/schema_codec.xml | 5 ++++-
solr/core/src/test/org/apache/solr/core/TestCodecSupport.java | 10 +++++++---
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema_codec.xml b/solr/core/src/test-files/solr/collection1/conf/schema_codec.xml
index 5c88fcd..3cb2f72 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema_codec.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema_codec.xml
@@ -16,7 +16,10 @@
limitations under the License.
-->
<schema name="codec" version="1.2">
- <fieldType name="string_direct" class="solr.StrField" postingsFormat="Direct" docValuesFormat="Direct"/>
+ <!-- NOTE: Direct (and Disk) DocValues formats were removed, so we use "Asserting"
+ as a way to vet that the configuration actually matters.
+ -->
+ <fieldType name="string_direct" class="solr.StrField" postingsFormat="Direct" docValuesFormat="Asserting" />
<fieldType name="string_standard" class="solr.StrField" postingsFormat="Lucene50"/>
<fieldType name="string_disk" class="solr.StrField" docValuesFormat="Lucene80"/>
diff --git a/solr/core/src/test/org/apache/solr/core/TestCodecSupport.java b/solr/core/src/test/org/apache/solr/core/TestCodecSupport.java
index 2da830f..a3daeb8 100644
--- a/solr/core/src/test/org/apache/solr/core/TestCodecSupport.java
+++ b/solr/core/src/test/org/apache/solr/core/TestCodecSupport.java
@@ -56,13 +56,15 @@ public class TestCodecSupport extends SolrTestCaseJ4 {
}
public void testDocValuesFormats() {
+ // NOTE: Direct (and Disk) DocValues formats were removed, so we use "Asserting"
+ // as a way to vet that the configuration actually matters.
Codec codec = h.getCore().getCodec();
Map<String, SchemaField> fields = h.getCore().getLatestSchema().getFields();
SchemaField schemaField = fields.get("string_disk_f");
PerFieldDocValuesFormat format = (PerFieldDocValuesFormat) codec.docValuesFormat();
assertEquals(TestUtil.getDefaultDocValuesFormat().getName(), format.getDocValuesFormatForField(schemaField.getName()).getName());
schemaField = fields.get("string_direct_f");
- assertEquals("Direct", format.getDocValuesFormatForField(schemaField.getName()).getName());
+ assertEquals("Asserting", format.getDocValuesFormatForField(schemaField.getName()).getName());
schemaField = fields.get("string_f");
assertEquals(TestUtil.getDefaultDocValuesFormat().getName(),
format.getDocValuesFormatForField(schemaField.getName()).getName());
@@ -79,13 +81,15 @@ public class TestCodecSupport extends SolrTestCaseJ4 {
}
public void testDynamicFieldsDocValuesFormats() {
+ // NOTE: Direct (and Disk) DocValues formats were removed, so we use "Asserting"
+ // as a way to vet that the configuration actually matters.
Codec codec = h.getCore().getCodec();
PerFieldDocValuesFormat format = (PerFieldDocValuesFormat) codec.docValuesFormat();
assertEquals(TestUtil.getDefaultDocValuesFormat().getName(), format.getDocValuesFormatForField("foo_disk").getName());
assertEquals(TestUtil.getDefaultDocValuesFormat().getName(), format.getDocValuesFormatForField("bar_disk").getName());
- assertEquals("Direct", format.getDocValuesFormatForField("foo_direct").getName());
- assertEquals("Direct", format.getDocValuesFormatForField("bar_direct").getName());
+ assertEquals("Asserting", format.getDocValuesFormatForField("foo_direct").getName());
+ assertEquals("Asserting", format.getDocValuesFormatForField("bar_direct").getName());
}
private void reloadCoreAndRecreateIndex() {