/** * Create a new SpanWeight * @param query the parent query * @param searcher the IndexSearcher to query against * @param termContexts a map of terms to termcontexts for use in building the similarity. May * be null if scores are not required * @throws IOException on error */ public SpanWeight(SpanQuery query, IndexSearcher searcher, Map<Term, TermContext> termContexts, float boost) throws IOException { super(query); this.field = query.getField(); this.similarity = searcher.getSimilarity(termContexts != null); this.simWeight = buildSimWeight(query, searcher, termContexts, boost); }
/** * Create a new SpanWeight * @param query the parent query * @param searcher the IndexSearcher to query against * @param termContexts a map of terms to termcontexts for use in building the similarity. May * be null if scores are not required * @throws IOException on error */ public SpanWeight(SpanQuery query, IndexSearcher searcher, Map<Term, TermContext> termContexts) throws IOException { super(query); this.field = query.getField(); this.similarity = searcher.getSimilarity(termContexts != null); this.simWeight = buildSimWeight(query, searcher, termContexts); }
/** * Create a new SpanWeight * @param query the parent query * @param searcher the IndexSearcher to query against * @param termContexts a map of terms to termcontexts for use in building the similarity. May * be null if scores are not required * @throws IOException on error */ public SpanWeight(SpanQuery query, IndexSearcher searcher, Map<Term, TermContext> termContexts) throws IOException { super(query); this.field = query.getField(); this.similarity = searcher.getSimilarity(termContexts != null); this.simWeight = buildSimWeight(query, searcher, termContexts); }
/** * Create a new SpanWeight * @param query the parent query * @param searcher the IndexSearcher to query against * @param termContexts a map of terms to termcontexts for use in building the similarity. May * be null if scores are not required * @throws IOException on error */ public SpanWeight(SpanQuery query, IndexSearcher searcher, Map<Term, TermContext> termContexts, float boost) throws IOException { super(query); this.field = query.getField(); this.similarity = searcher.getSimilarity(termContexts != null); this.simWeight = buildSimWeight(query, searcher, termContexts, boost); }