|
31 | 31 | import org.elasticsearch.action.search.SearchResponse;
|
32 | 32 | import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
33 | 33 | import org.elasticsearch.common.FieldMemoryStats;
|
34 |
| -import org.elasticsearch.common.Strings; |
35 | 34 | import org.elasticsearch.common.settings.Settings;
|
36 | 35 | import org.elasticsearch.common.unit.Fuzziness;
|
37 | 36 | import org.elasticsearch.common.xcontent.XContentBuilder;
|
38 | 37 | import org.elasticsearch.common.xcontent.XContentFactory;
|
39 |
| -import org.elasticsearch.common.xcontent.XContentType; |
40 | 38 | import org.elasticsearch.index.mapper.MapperParsingException;
|
41 | 39 | import org.elasticsearch.plugins.Plugin;
|
42 | 40 | import org.elasticsearch.search.aggregations.AggregationBuilders;
|
@@ -1111,35 +1109,6 @@ public void testIssue5930() throws IOException {
|
1111 | 1109 | }
|
1112 | 1110 | }
|
1113 | 1111 |
|
1114 |
| - // see issue #6399 |
1115 |
| - public void testIndexingUnrelatedNullValue() throws Exception { |
1116 |
| - String mapping = Strings |
1117 |
| - .toString(jsonBuilder() |
1118 |
| - .startObject() |
1119 |
| - .startObject(TYPE) |
1120 |
| - .startObject("properties") |
1121 |
| - .startObject(FIELD) |
1122 |
| - .field("type", "completion") |
1123 |
| - .endObject() |
1124 |
| - .endObject() |
1125 |
| - .endObject() |
1126 |
| - .endObject()); |
1127 |
| - |
1128 |
| - assertAcked(client().admin().indices().prepareCreate(INDEX).addMapping(TYPE, mapping, XContentType.JSON).get()); |
1129 |
| - ensureGreen(); |
1130 |
| - |
1131 |
| - client().prepareIndex(INDEX, TYPE, "1").setSource(FIELD, "strings make me happy", FIELD + "_1", "nulls make me sad") |
1132 |
| - .setRefreshPolicy(IMMEDIATE).get(); |
1133 |
| - |
1134 |
| - try { |
1135 |
| - client().prepareIndex(INDEX, TYPE, "2").setSource(FIELD, null, FIELD + "_1", "nulls make me sad").get(); |
1136 |
| - fail("Expected MapperParsingException for null value"); |
1137 |
| - } catch (MapperParsingException e) { |
1138 |
| - // make sure that the exception has the name of the field causing the error |
1139 |
| - assertTrue(e.getDetailedMessage().contains(FIELD)); |
1140 |
| - } |
1141 |
| - } |
1142 |
| - |
1143 | 1112 | public void testMultiDocSuggestions() throws Exception {
|
1144 | 1113 | final CompletionMappingBuilder mapping = new CompletionMappingBuilder();
|
1145 | 1114 | createIndexAndMapping(mapping);
|
|
0 commit comments