|
@@ -2429,7 +2429,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\", \"fielddata\": true }}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\", \"fielddata\": true }}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard shard = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, wrapper);
|
|
@@ -2556,7 +2556,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard primary = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|
|
@@ -2601,7 +2601,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, randomLongBetween(1, Long.MAX_VALUE)).build();
|
|
|
IndexShard primary = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|
|
@@ -2658,7 +2658,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard primary = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|
|
@@ -2707,7 +2707,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard primary = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|
|
@@ -2782,7 +2782,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("source")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
|
|
@@ -3321,7 +3321,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard primary = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|
|
@@ -3365,7 +3365,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard primary = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|
|
@@ -3434,7 +3434,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard primary = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|
|
@@ -3470,7 +3470,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard primary = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|
|
@@ -3540,7 +3540,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard primary = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|
|
@@ -3636,7 +3636,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("test")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
ShardRouting shardRouting =
|
|
@@ -3933,7 +3933,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
public void testResetEngineWithBrokenTranslog() throws Exception {
|
|
|
IndexShard shard = newStartedShard(false);
|
|
|
updateMappings(shard, IndexMetaData.builder(shard.indexSettings.getIndexMetaData())
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}").build());
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}").build());
|
|
|
final List<Translog.Operation> operations = Stream.concat(
|
|
|
IntStream.range(0, randomIntBetween(0, 10)).mapToObj(n -> new Translog.Index("1", 0, shard.getPendingPrimaryTerm(), 1,
|
|
|
"{\"foo\" : \"bar\"}".getBytes(Charset.forName("UTF-8")), null, -1)),
|
|
@@ -4033,7 +4033,7 @@ public class IndexShardTests extends IndexShardTestCase {
|
|
|
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
.build();
|
|
|
IndexMetaData metaData = IndexMetaData.builder("index")
|
|
|
- .putMapping("_doc", "{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
+ .putMapping("{ \"properties\": { \"foo\": { \"type\": \"text\"}}}")
|
|
|
.settings(settings)
|
|
|
.primaryTerm(0, 1).build();
|
|
|
IndexShard shard = newShard(new ShardId(metaData.getIndex(), 0), true, "n1", metaData, null);
|