Query的子类ConstantScoreQuery

主要用于过滤查询和将multiTermQuery rewrite为原子查询后使用的查询对象, 他会返回一个constantquery

 

A query that wraps another query or a filter and simply returns a constant score equal to the
 query boost for every document that matches the filter or query.
 For queries it therefore simply strips of all scores and returns a constant one.

 

 

public class ConstantScoreQuery extends Query {
  protected final Filter filter;
  protected final Query query;

 

 

 

 

 

constantScoreQuery是对原子query或filter的包装

posted @ 2017-12-09 09:58  車輪の唄  阅读(10)  评论(0编辑  收藏  举报  来源