本文整理了Java中org.lumongo.client.command.Query.addFilterQuery
方法的一些代码示例,展示了Query.addFilterQuery
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.addFilterQuery
方法的具体详情如下:
包路径:org.lumongo.client.command.Query
类名称:Query
方法名:addFilterQuery
暂无
代码示例来源:origin: lumongo/lumongo
public Query addFilterQuery(String query, Collection<String> queryFields) {
return addFilterQuery(query, queryFields, null, null);
}
代码示例来源:origin: lumongo/lumongo
public Query addFilterQuery(String query, Collection<String> queryFields, Integer minimumNumberShouldMatch) {
return addFilterQuery(query, queryFields, null, minimumNumberShouldMatch);
}
代码示例来源:origin: lumongo/lumongo
public Query addFilterQuery(String query, Collection<String> queryFields, Operator defaultOperator) {
return addFilterQuery(query, queryFields, defaultOperator, null);
}
代码示例来源:origin: lumongo/lumongo
public Query addFilterQuery(String query) {
return addFilterQuery(query, null, null, null);
}
代码示例来源:origin: lumongo/lumongo
public void moreComplexQuery() throws Exception {
int numberOfResults = 10;
Query query = new Query(Arrays.asList(MY_INDEX_NAME, MY_INDEX_NAME2), "cancer cure", numberOfResults);
query.addQueryField("abstract");
query.addQueryField("title");
query.addFilterQuery("title:special");
query.addFilterQuery("issn:1234-1234");
QueryResult queryResult = lumongoWorkPool.query(query);
long totalHits = queryResult.getTotalHits();
System.out.println("Found <" + totalHits + "> hits");
for (ScoredResult sr : queryResult.getResults()) {
System.out.println("Matching document <" + sr.getUniqueId() + "> with score <" + sr.getScore() + ">");
}
}
内容来源于网络,如有侵权,请联系作者删除!