Tests: Do not index dummy documents in ExistsMissingTests.
This way we make sure that there is only one mapping for _field_names.
This commit is contained in:
parent
4ddb0575b5
commit
3e50bce822
|
@ -33,7 +33,6 @@ import org.elasticsearch.index.mapper.internal.FieldNamesFieldMapper;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.elasticsearch.index.query.support.QueryParsers.wrapSmartNameFilter;
|
||||
|
||||
|
|
|
@ -91,7 +91,10 @@ public class ExistsMissingTests extends ElasticsearchIntegrationTest {
|
|||
for (Map<String, Object> source : sources) {
|
||||
reqs.add(client().prepareIndex("idx", "type").setSource(source));
|
||||
}
|
||||
indexRandom(true, reqs);
|
||||
// We do NOT index dummy documents, otherwise the type for these dummy documents
|
||||
// would have _field_names indexed while the current type might not which might
|
||||
// confuse the exists/missing parser at query time
|
||||
indexRandom(true, false, reqs);
|
||||
|
||||
final Map<String, Integer> expected = new LinkedHashMap<String, Integer>();
|
||||
expected.put("foo", 1);
|
||||
|
|
Loading…
Reference in New Issue