org.apache.lucene.bigram
Class BigramSpanRangeQuery
Object
Query
SpanQuery
SpanRangeQuery
BigramSpanRangeQuery
- All Implemented Interfaces:
- Serializable, Cloneable
- Direct Known Subclasses:
- XtfSpanRangeQuery
public class BigramSpanRangeQuery
- extends SpanRangeQuery
Matches spans containing terms within a specified range. Performs extra
filtering to make sure bi-grams are not matched.
- See Also:
- Serialized Form
Constructor Summary |
BigramSpanRangeQuery(Term lowerTerm,
Term upperTerm,
boolean inclusive,
int termLimit)
Constructs a span query selecting all terms greater than
lowerTerm but less than upperTerm . |
Method Summary |
void |
setStopWords(Set set)
|
protected boolean |
shouldSkipTerm(Term term)
Enables derived classes to skip certain terms in the index (e.g. stop
words, bi-grams, etc.) |
Methods inherited from class Query |
clone, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight |
Methods inherited from class Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
stopSet
private Set stopSet
BigramSpanRangeQuery
public BigramSpanRangeQuery(Term lowerTerm,
Term upperTerm,
boolean inclusive,
int termLimit)
- Constructs a span query selecting all terms greater than
lowerTerm
but less than upperTerm
.
There must be at least one term and either term may be null,
in which case there is no bound on that side, but if there are
two terms, both terms must be for the same field. Applies
a limit on the total number of terms matched.
setStopWords
public void setStopWords(Set set)
shouldSkipTerm
protected boolean shouldSkipTerm(Term term)
- Description copied from class:
SpanRangeQuery
- Enables derived classes to skip certain terms in the index (e.g. stop
words, bi-grams, etc.) Default implementation doesn't skip any terms.
- Overrides:
shouldSkipTerm
in class SpanRangeQuery