mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 18:35:25 +00:00
IndexActionTests: Always map foo
as a keyword.
Original commit: elastic/x-pack-elasticsearch@de2ad22c57
This commit is contained in:
parent
0531dd8b88
commit
ffb70f3011
@ -36,6 +36,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.elasticsearch.search.aggregations.AggregationBuilders.terms;
|
||||
import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasEntry;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
@ -120,9 +121,11 @@ public class IndexActionTests extends ESIntegTestCase {
|
||||
boolean customTimestampField = "@timestamp".equals(timestampField);
|
||||
|
||||
if (timestampField == null || "_timestamp".equals(timestampField)) {
|
||||
assertThat(prepareCreate("test-index")
|
||||
.addMapping("test-type", "_timestamp", "enabled=true", "foo", "type=keyword")
|
||||
.get().isAcknowledged(), is(true));
|
||||
assertAcked(prepareCreate("test-index")
|
||||
.addMapping("test-type", "_timestamp", "enabled=true", "foo", "type=keyword"));
|
||||
} else {
|
||||
assertAcked(prepareCreate("test-index")
|
||||
.addMapping("test-type", "foo", "type=keyword"));
|
||||
}
|
||||
|
||||
Object list = randomFrom(
|
||||
|
Loading…
x
Reference in New Issue
Block a user