Updated "string" datatype in docs & tests to "text" (#27629)
This commit is contained in:
parent
7a44596446
commit
b44ae25c27
|
@ -98,7 +98,7 @@ public class MetaDataMappingServiceTests extends ESSingleNodeTestCase {
|
|||
final ClusterService clusterService = getInstanceFromNode(ClusterService.class);
|
||||
// TODO - it will be nice to get a random mapping generator
|
||||
final PutMappingClusterStateUpdateRequest request = new PutMappingClusterStateUpdateRequest().type("type");
|
||||
request.source("{ \"properties\" { \"field\": { \"type\": \"string\" }}}");
|
||||
request.source("{ \"properties\" { \"field\": { \"type\": \"text\" }}}");
|
||||
mappingService.putMappingExecutor.execute(clusterService.state(), Collections.singletonList(request));
|
||||
assertThat(indexService.mapperService().documentMapper("type").mappingSource(), equalTo(currentMapping));
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class MetaDataMappingServiceTests extends ESSingleNodeTestCase {
|
|||
final MetaDataMappingService mappingService = getInstanceFromNode(MetaDataMappingService.class);
|
||||
final ClusterService clusterService = getInstanceFromNode(ClusterService.class);
|
||||
final PutMappingClusterStateUpdateRequest request = new PutMappingClusterStateUpdateRequest().type("type");
|
||||
request.source("{ \"properties\" { \"field\": { \"type\": \"string\" }}}");
|
||||
request.source("{ \"properties\" { \"field\": { \"type\": \"text\" }}}");
|
||||
ClusterState result = mappingService.putMappingExecutor.execute(clusterService.state(), Collections.singletonList(request))
|
||||
.resultingState;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ client.admin().indices().prepareCreate("twitter") <1>
|
|||
" \"tweet\": {\n" +
|
||||
" \"properties\": {\n" +
|
||||
" \"message\": {\n" +
|
||||
" \"type\": \"string\"\n" +
|
||||
" \"type\": \"text\"\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
|
@ -30,7 +30,7 @@ client.admin().indices().preparePutMapping("twitter") <1>
|
|||
.setSource("{\n" + <3>
|
||||
" \"properties\": {\n" +
|
||||
" \"name\": {\n" +
|
||||
" \"type\": \"string\"\n" +
|
||||
" \"type\": \"text\"\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
"}")
|
||||
|
@ -43,7 +43,7 @@ client.admin().indices().preparePutMapping("twitter")
|
|||
" \"user\":{\n" + <4>
|
||||
" \"properties\": {\n" +
|
||||
" \"name\": {\n" +
|
||||
" \"type\": \"string\"\n" +
|
||||
" \"type\": \"text\"\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
|
@ -64,7 +64,7 @@ client.admin().indices().preparePutMapping("twitter") <1>
|
|||
.setSource("{\n" + <3>
|
||||
" \"properties\": {\n" +
|
||||
" \"user_name\": {\n" +
|
||||
" \"type\": \"string\"\n" +
|
||||
" \"type\": \"text\"\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
"}")
|
||||
|
|
Loading…
Reference in New Issue