本文整理汇总了Java中org.elasticsearch.action.admin.indices.get.GetIndexResponse.getMappings方法的典型用法代码示例。如果您正苦于以下问题:Java GetIndexResponse.getMappings方法的具体用法?Java GetIndexResponse.getMappings怎么用?Java GetIndexResponse.getMappings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.action.admin.indices.get.GetIndexResponse
的用法示例。
在下文中一共展示了GetIndexResponse.getMappings方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showAll_atLeastOneIndexReturns
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showAll_atLeastOneIndexReturns() throws SqlParseException, SQLFeatureNotSupportedException, IOException {
String query = "show *";
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
Assert.assertTrue(mappings.size() >= 1);
}
示例2: showIndex_onlyOneIndexReturn
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showIndex_onlyOneIndexReturn() throws SqlParseException, SQLFeatureNotSupportedException, IOException {
String query = "show "+ TEST_INDEX;
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
Assert.assertEquals(1, mappings.size());
Assert.assertTrue(mappings.containsKey(TEST_INDEX));
}
示例3: showIndex_onlyOneIndexReturWithMoreThanOneTypes
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showIndex_onlyOneIndexReturWithMoreThanOneTypes() throws SqlParseException, SQLFeatureNotSupportedException, IOException {
String query = "show "+ TEST_INDEX;
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
ImmutableOpenMap<String, MappingMetaData> typeToData = mappings.get(TEST_INDEX);
Assert.assertTrue(typeToData.size()>1);
}
示例4: showIndexType_onlyOneTypeReturn
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showIndexType_onlyOneTypeReturn() throws SqlParseException, SQLFeatureNotSupportedException, IOException {
String query = String.format("show %s/account", TEST_INDEX);
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
ImmutableOpenMap<String, MappingMetaData> typeToData = mappings.get(TEST_INDEX);
Assert.assertEquals(1,typeToData.size());
}
示例5: showIndex_onlyOneIndexReturn
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showIndex_onlyOneIndexReturn() throws SqlParseException, SQLFeatureNotSupportedException, IOException {
String query = "show "+ TestsConstants.TEST_INDEX;
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
Assert.assertEquals(1, mappings.size());
Assert.assertTrue(mappings.containsKey(TestsConstants.TEST_INDEX));
}
示例6: showIndex_onlyOneIndexReturWithMoreThanOneTypes
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showIndex_onlyOneIndexReturWithMoreThanOneTypes() throws SqlParseException, SQLFeatureNotSupportedException, IOException {
String query = "show "+ TestsConstants.TEST_INDEX;
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
ImmutableOpenMap<String, MappingMetaData> typeToData = mappings.get(TestsConstants.TEST_INDEX);
Assert.assertTrue(typeToData.size()>1);
}
示例7: showIndexType_onlyOneTypeReturn
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showIndexType_onlyOneTypeReturn() throws SqlParseException, SQLFeatureNotSupportedException, IOException {
String query = String.format("show %s/account", TestsConstants.TEST_INDEX);
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
ImmutableOpenMap<String, MappingMetaData> typeToData = mappings.get(TestsConstants.TEST_INDEX);
Assert.assertEquals(1,typeToData.size());
}
示例8: showIndex_onlyOneIndexReturn
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showIndex_onlyOneIndexReturn() throws SqlParseException, SQLFeatureNotSupportedException, IOException {
String query = "show "+ TEST_INDEX_ACCOUNT;
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
Assert.assertEquals(1, mappings.size());
Assert.assertTrue(mappings.containsKey(TEST_INDEX_ACCOUNT));
}
示例9: showIndex_onlyOneIndexReturWithMoreThanOneTypes
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showIndex_onlyOneIndexReturWithMoreThanOneTypes() throws SqlParseException, SQLFeatureNotSupportedException {
String query = "show " + TEST_INDEX + "*";
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
Assert.assertTrue(mappings.size()>1);
}
示例10: showIndexType_onlyOneTypeReturn
import org.elasticsearch.action.admin.indices.get.GetIndexResponse; //导入方法依赖的package包/类
@Test
public void showIndexType_onlyOneTypeReturn() throws SqlParseException, SQLFeatureNotSupportedException, IOException {
String query = String.format("show %s/account", TEST_INDEX_ACCOUNT);
GetIndexResponse getIndexResponse = runShowQuery(query);
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = getIndexResponse.getMappings();
ImmutableOpenMap<String, MappingMetaData> typeToData = mappings.get(TEST_INDEX_ACCOUNT);
Assert.assertEquals(1,typeToData.size());
}