本文整理汇总了Java中org.elasticsearch.index.query.QueryParser类的典型用法代码示例。如果您正苦于以下问题:Java QueryParser类的具体用法?Java QueryParser怎么用?Java QueryParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QueryParser类属于org.elasticsearch.index.query包,在下文中一共展示了QueryParser类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: IndicesQueriesRegistry
import org.elasticsearch.index.query.QueryParser; //导入依赖的package包/类
@Inject
public IndicesQueriesRegistry(Settings settings, Set<QueryParser> injectedQueryParsers) {
super(settings);
Map<String, QueryParser> queryParsers = Maps.newHashMap();
for (QueryParser queryParser : injectedQueryParsers) {
for (String name : queryParser.names()) {
queryParsers.put(name, queryParser);
}
}
this.queryParsers = ImmutableMap.copyOf(queryParsers);
}
开发者ID:baidu,项目名称:Elasticsearch,代码行数:12,代码来源:IndicesQueriesRegistry.java
示例2: queryParsers
import org.elasticsearch.index.query.QueryParser; //导入依赖的package包/类
/**
* Returns all the registered query parsers
*/
public ImmutableMap<String, QueryParser> queryParsers() {
return queryParsers;
}
开发者ID:baidu,项目名称:Elasticsearch,代码行数:7,代码来源:IndicesQueriesRegistry.java
示例3: QuerySpec
import org.elasticsearch.index.query.QueryParser; //导入依赖的package包/类
/**
* Specification of custom {@link Query}.
*
* @param name holds the names by which this query might be parsed. The {@link ParseField#getPreferredName()} is special as it
* is the name by under which the reader is registered. So it is the name that the query should use as its
* {@link NamedWriteable#getWriteableName()} too.
* @param reader the reader registered for this query's builder. Typically a reference to a constructor that takes a
* {@link StreamInput}
* @param parser the parser the reads the query builder from xcontent
*/
public QuerySpec(ParseField name, Writeable.Reader<T> reader, QueryParser<T> parser) {
super(name, reader, parser);
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:SearchPlugin.java
注:本文中的org.elasticsearch.index.query.QueryParser类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论