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


Java QueryParseContext.parseInnerQueryBuilder方法代码示例

本文整理汇总了Java中org.elasticsearch.index.query.QueryParseContext.parseInnerQueryBuilder方法的典型用法代码示例。如果您正苦于以下问题:Java QueryParseContext.parseInnerQueryBuilder方法的具体用法?Java QueryParseContext.parseInnerQueryBuilder怎么用?Java QueryParseContext.parseInnerQueryBuilder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.index.query.QueryParseContext的用法示例。


在下文中一共展示了QueryParseContext.parseInnerQueryBuilder方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseQueryBuilder

import org.elasticsearch.index.query.QueryParseContext; //导入方法依赖的package包/类
private static QueryBuilder parseQueryBuilder(QueryParseContext context, XContentLocation location) {
    try {
        return context.parseInnerQueryBuilder();
    } catch (IOException e) {
        throw new ParsingException(location, "Failed to parse", e);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:PercolatorFieldMapper.java

示例2: doRewrite

import org.elasticsearch.index.query.QueryParseContext; //导入方法依赖的package包/类
@Override
protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) throws IOException {
    BytesReference querySource = queryRewriteContext.getTemplateBytes(template);
    try (XContentParser qSourceParser = XContentFactory.xContent(querySource).createParser(queryRewriteContext.getXContentRegistry(),
            querySource)) {
        final QueryParseContext queryParseContext = queryRewriteContext.newParseContext(qSourceParser);
        final QueryBuilder queryBuilder = queryParseContext.parseInnerQueryBuilder();
        if (boost() != DEFAULT_BOOST || queryName() != null) {
            final BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder();
            boolQueryBuilder.must(queryBuilder);
            return boolQueryBuilder;
        }
        return queryBuilder;
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:16,代码来源:TemplateQueryBuilder.java

示例3: parseNestedFilter

import org.elasticsearch.index.query.QueryParseContext; //导入方法依赖的package包/类
protected static QueryBuilder parseNestedFilter(XContentParser parser, QueryParseContext context) {
    try {
        return context.parseInnerQueryBuilder();
    } catch (Exception e) {
        throw new ParsingException(parser.getTokenLocation(), "Expected " + NESTED_FILTER_FIELD.getPreferredName() + " element.", e);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:SortBuilder.java

示例4: parseQuery

import org.elasticsearch.index.query.QueryParseContext; //导入方法依赖的package包/类
protected static QueryBuilder parseQuery(XContentParser parser) throws IOException {
    QueryParseContext context = createParseContext(parser);
    QueryBuilder parseInnerQueryBuilder = context.parseInnerQueryBuilder();
    assertNull(parser.nextToken());
    return parseInnerQueryBuilder;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:7,代码来源:AbstractQueryTestCase.java

示例5: parse

import org.elasticsearch.index.query.QueryParseContext; //导入方法依赖的package包/类
public static FilterAggregationBuilder parse(String aggregationName, QueryParseContext context) throws IOException {
    QueryBuilder filter = context.parseInnerQueryBuilder();
    return new FilterAggregationBuilder(aggregationName, filter);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:FilterAggregationBuilder.java

示例6: validateAliasFilter

import org.elasticsearch.index.query.QueryParseContext; //导入方法依赖的package包/类
private static void validateAliasFilter(XContentParser parser, QueryShardContext queryShardContext) throws IOException {
    QueryParseContext queryParseContext = queryShardContext.newParseContext(parser);
    QueryBuilder parseInnerQueryBuilder = queryParseContext.parseInnerQueryBuilder();
    QueryBuilder queryBuilder = QueryBuilder.rewriteQuery(parseInnerQueryBuilder, queryShardContext);
    queryBuilder.toFilter(queryShardContext);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:7,代码来源:AliasValidator.java


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