当前位置: 首页>>代码示例>>Java>>正文


Java GetIndexResponse.getMappings方法代码示例

本文整理汇总了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);

}
 
开发者ID:mazhou,项目名称:es-sql,代码行数:9,代码来源:ShowTest.java

示例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));

}
 
开发者ID:mazhou,项目名称:es-sql,代码行数:10,代码来源:ShowTest.java

示例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);
}
 
开发者ID:mazhou,项目名称:es-sql,代码行数:9,代码来源:ShowTest.java

示例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());
}
 
开发者ID:mazhou,项目名称:es-sql,代码行数:9,代码来源:ShowTest.java

示例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));

}
 
开发者ID:selvakumarEsra,项目名称:es4sql,代码行数:10,代码来源:ShowTest.java

示例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);
}
 
开发者ID:selvakumarEsra,项目名称:es4sql,代码行数:9,代码来源:ShowTest.java

示例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());
}
 
开发者ID:selvakumarEsra,项目名称:es4sql,代码行数:9,代码来源:ShowTest.java

示例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));

}
 
开发者ID:NLPchina,项目名称:elasticsearch-sql,代码行数:10,代码来源:ShowTest.java

示例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);
}
 
开发者ID:NLPchina,项目名称:elasticsearch-sql,代码行数:8,代码来源:ShowTest.java

示例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());
}
 
开发者ID:NLPchina,项目名称:elasticsearch-sql,代码行数:9,代码来源:ShowTest.java


注:本文中的org.elasticsearch.action.admin.indices.get.GetIndexResponse.getMappings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。