public static MakeBooleanQuery ( IEnumerable |
||
queries | IEnumerable |
|
occur | ||
Результат | Search.Query |
public override Search.Query Rewrite(IndexReader reader) { var luceneSubQueries = new List <Search.Query>(); srndQuery.VisitMatchingTerms(reader, fieldName, new SimpleTermRewriteMatchingTermVisitor(luceneSubQueries, qf)); return((luceneSubQueries.Count == 0) ? SrndQuery.TheEmptyLcnQuery : (luceneSubQueries.Count == 1) ? luceneSubQueries.First() : SrndBooleanQuery.MakeBooleanQuery( /* luceneSubQueries all have default weight */ luceneSubQueries, BooleanClause.Occur.SHOULD)); /* OR the subquery terms */ }
public override Search.Query MakeLuceneQueryFieldNoBoost(string fieldName, BasicQueryFactory qf) { return(SrndBooleanQuery.MakeBooleanQuery( /* subqueries can be individually boosted */ MakeLuceneSubQueriesField(fieldName, qf), BooleanClause.Occur.MUST)); }