From 43fcc55625b8617e3a2c9ff609305279e6f3e94d Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 15 Aug 2013 13:05:04 +0200 Subject: [PATCH] Remove 'concrete_bytes' fielddata impl from tests We don't have this implementation anymore tests will just fallback to default and issue a warning. --- .../search/facet/SimpleFacetsTests.java | 17 ++--------------- .../index/fielddata/DuellFieldDataTests.java | 2 -- .../index/fielddata/FilterFieldDataTest.java | 4 ++-- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/test/java/org/elasticsearch/test/integration/search/facet/SimpleFacetsTests.java b/src/test/java/org/elasticsearch/test/integration/search/facet/SimpleFacetsTests.java index 67fae4c7c6f..3eff710cd5a 100644 --- a/src/test/java/org/elasticsearch/test/integration/search/facet/SimpleFacetsTests.java +++ b/src/test/java/org/elasticsearch/test/integration/search/facet/SimpleFacetsTests.java @@ -433,10 +433,6 @@ public class SimpleFacetsTests extends AbstractSharedClusterTest { public void testDuelByteFieldDataImpl() throws ElasticSearchException, IOException, InterruptedException, ExecutionException { prepareCreate("test") .addMapping("type", jsonBuilder().startObject().startObject("type").startObject("properties") - .startObject("name_concrete") - .field("type", "string") - .startObject("fielddata").field("format", "concrete_bytes").endObject() - .endObject() .startObject("name_paged") .field("type", "string") .startObject("fielddata").field("format", "paged_bytes").endObject() @@ -445,10 +441,6 @@ public class SimpleFacetsTests extends AbstractSharedClusterTest { .field("type", "string") .startObject("fielddata").field("format", "fst").endObject() .endObject() - .startObject("name_concrete_mv") - .field("type", "string") - .startObject("fielddata").field("format", "concrete_bytes").endObject() - .endObject() .startObject("name_paged_mv") .field("type", "string") .startObject("fielddata").field("format", "paged_bytes").endObject() @@ -475,11 +467,9 @@ public class SimpleFacetsTests extends AbstractSharedClusterTest { for (int i = 0; i < 100; i++) { client().prepareIndex("test", "type", ""+i).setSource(jsonBuilder().startObject() - .field("name_concrete", ""+i) .field("name_paged", ""+i) .field("name_fst", ""+i) .field("filtered", ""+i) - .field("name_concrete_mv", ""+i, ""+Math.min(99, i+1)) .field("name_paged_mv", ""+i,""+ Math.min(99, i+1)) .field("name_fst_mv", ""+i,""+Math.min(99, i+1)) .field("filtered_mv", ""+i,""+Math.min(99, i+1), ""+(100 + i)) @@ -533,12 +523,9 @@ public class SimpleFacetsTests extends AbstractSharedClusterTest { final SearchRequestBuilder facetRequest; int incrementAndGet = count.incrementAndGet(); final String field; - switch (incrementAndGet % 3) { - case 2: - field = "filtered"+postfix; - break; + switch (incrementAndGet % 2) { case 1: - field = "name_concrete"+postfix; + field = "filtered"+postfix; break; case 0: field = "name_paged"+postfix; diff --git a/src/test/java/org/elasticsearch/test/unit/index/fielddata/DuellFieldDataTests.java b/src/test/java/org/elasticsearch/test/unit/index/fielddata/DuellFieldDataTests.java index 1760444da26..020036f0dbd 100644 --- a/src/test/java/org/elasticsearch/test/unit/index/fielddata/DuellFieldDataTests.java +++ b/src/test/java/org/elasticsearch/test/unit/index/fielddata/DuellFieldDataTests.java @@ -73,7 +73,6 @@ public class DuellFieldDataTests extends AbstractFieldDataTests { Map typeMap = new HashMap(); typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "fst")), Type.Bytes); typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "paged_bytes")), Type.Bytes); - typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "concrete_bytes")), Type.Bytes); typeMap.put(new FieldDataType("byte"), Type.Integer); typeMap.put(new FieldDataType("short"), Type.Integer); typeMap.put(new FieldDataType("int"), Type.Integer); @@ -242,7 +241,6 @@ public class DuellFieldDataTests extends AbstractFieldDataTests { Map typeMap = new HashMap(); typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "fst")), Type.Bytes); typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "paged_bytes")), Type.Bytes); - typeMap.put(new FieldDataType("string", ImmutableSettings.builder().put("format", "concrete_bytes")), Type.Bytes); // TODO add filters ArrayList> list = new ArrayList>(typeMap.entrySet()); Preprocessor pre = new Preprocessor(); diff --git a/src/test/java/org/elasticsearch/test/unit/index/fielddata/FilterFieldDataTest.java b/src/test/java/org/elasticsearch/test/unit/index/fielddata/FilterFieldDataTest.java index d86be7c60d1..a895cbda41e 100644 --- a/src/test/java/org/elasticsearch/test/unit/index/fielddata/FilterFieldDataTest.java +++ b/src/test/java/org/elasticsearch/test/unit/index/fielddata/FilterFieldDataTest.java @@ -64,7 +64,7 @@ public class FilterFieldDataTest extends AbstractFieldDataTests { } writer.forceMerge(1); AtomicReaderContext context = refreshReader(); - String[] formats = new String[] { "fst", "paged_bytes", "concrete_bytes" }; + String[] formats = new String[] { "fst", "paged_bytes"}; for (String format : formats) { { @@ -167,7 +167,7 @@ public class FilterFieldDataTest extends AbstractFieldDataTests { System.out.println(hundred + " " + ten + " " +five); writer.forceMerge(1); AtomicReaderContext context = refreshReader(); - String[] formats = new String[] { "fst", "paged_bytes", "concrete_bytes" }; + String[] formats = new String[] { "fst", "paged_bytes"}; for (String format : formats) { { ifdService.clear();