Java 类org.apache.lucene.search.highlight.WeightedSpanTerm 实例源码

项目:elasticsearch_my    文件:CustomQueryScorer.java   
@Override
protected void extractUnknownQuery(Query query,
                                   Map<String, WeightedSpanTerm> terms) throws IOException {
    if (terms.isEmpty()) {
        extractWeightedTerms(terms, query, 1F);
    }
}
项目:elasticsearch_my    文件:CustomQueryScorer.java   
protected void extract(Query query, float boost, Map<String, WeightedSpanTerm> terms) throws IOException {
    if (query instanceof HasChildQueryBuilder.LateParsingQuery) {
        // skip has_child or has_parent queries, see: https://github.com/elastic/elasticsearch/issues/14999
        return;
    } else if (query instanceof FunctionScoreQuery) {
        super.extract(((FunctionScoreQuery) query).getSubQuery(), boost, terms);
    } else if (query instanceof FiltersFunctionScoreQuery) {
        super.extract(((FiltersFunctionScoreQuery) query).getSubQuery(), boost, terms);
    } else {
        super.extract(query, boost, terms);
    }
}
项目:Elasticsearch    文件:CustomQueryScorer.java   
@Override
protected void extractUnknownQuery(Query query,
                                   Map<String, WeightedSpanTerm> terms) throws IOException {
    if (query instanceof FunctionScoreQuery) {
        query = ((FunctionScoreQuery) query).getSubQuery();
        extract(query, query.getBoost(), terms);
    } else if (query instanceof FiltersFunctionScoreQuery) {
        query = ((FiltersFunctionScoreQuery) query).getSubQuery();
        extract(query, query.getBoost(), terms);
    } else if (terms.isEmpty()) {
        extractWeightedTerms(terms, query, query.getBoost());
    }
}
项目:search    文件:HighlightCustomQueryTest.java   
@Override
protected void extractUnknownQuery(Query query,
    Map<String, WeightedSpanTerm> terms) throws IOException {
  if (query instanceof CustomQuery) {
    extractWeightedTerms(terms, new TermQuery(((CustomQuery) query).term));
  }
}
项目:NYBC    文件:HighlightCustomQueryTest.java   
@Override
protected void extractUnknownQuery(Query query,
    Map<String, WeightedSpanTerm> terms) throws IOException {
  if (query instanceof CustomQuery) {
    extractWeightedTerms(terms, new TermQuery(((CustomQuery) query).term));
  }
}
项目:Maskana-Gestor-de-Conocimiento    文件:HighlightCustomQueryTest.java   
@Override
protected void extractUnknownQuery(Query query,
    Map<String, WeightedSpanTerm> terms) throws IOException {
  if (query instanceof CustomQuery) {
    extractWeightedTerms(terms, new TermQuery(((CustomQuery) query).term));
  }
}
项目:elasticsearch_my    文件:CustomQueryScorer.java   
public CustomQueryScorer(WeightedSpanTerm[] weightedTerms) {
    super(weightedTerms);
}
项目:Elasticsearch    文件:CustomQueryScorer.java   
public CustomQueryScorer(WeightedSpanTerm[] weightedTerms) {
    super(weightedTerms);
}