org.lumongo.client.command.Query.addFilterQuery()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(185)

本文整理了Java中org.lumongo.client.command.Query.addFilterQuery方法的一些代码示例,展示了Query.addFilterQuery的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.addFilterQuery方法的具体详情如下:
包路径:org.lumongo.client.command.Query
类名称:Query
方法名:addFilterQuery

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() + ">");
  }
}

相关文章