public class SpanFuzzyQuery extends BLSpanQuery
Modifier and Type | Field and Description |
---|---|
static int |
defaultMaxEdits |
static int |
defaultPrefixLength |
MAX_UNLIMITED
Constructor and Description |
---|
SpanFuzzyQuery(org.apache.lucene.index.Term term) |
SpanFuzzyQuery(org.apache.lucene.index.Term term,
int maxEdits,
int prefixLength) |
Modifier and Type | Method and Description |
---|---|
BLSpanWeight |
createWeight(org.apache.lucene.search.IndexSearcher searcher,
boolean needsScores) |
boolean |
equals(Object o) |
int |
forwardMatchingCost()
Return an (very rough) indication of how expensive finding a match for this
query using an NFA would be.
|
String |
getRealField() |
int |
hashCode() |
boolean |
hitsAllSameLength()
Do our hits have constant length?
|
boolean |
hitsAreUnique()
Is it guaranteed that no two hits have the same start and end position?
|
boolean |
hitsEndPointSorted()
When hit B follows hit A, is it guaranteed that B.end >= A.end? Also, if
A.end == B.end, is B.start > A.start?
|
boolean |
hitsHaveUniqueEnd()
Is it guaranteed that no two hits have the same end position?
|
boolean |
hitsHaveUniqueStart()
Is it guaranteed that no two hits have the same start position?
|
int |
hitsLengthMax()
How long could our longest hit be?
|
int |
hitsLengthMin()
How long could our shortest hit be?
|
boolean |
hitsStartPointSorted()
When hit B follows hit A, is it guaranteed that B.start >= A.start? Also,
if A.start == B.start, is B.end > A.end?
|
long |
reverseMatchingCost(org.apache.lucene.index.IndexReader reader)
Return an (very rough) indication of how many hits this clause might return.
|
BLSpanQuery |
rewrite(org.apache.lucene.index.IndexReader reader) |
String |
toString(String field)
Prints a query to a string, with
field as the default field for
terms. |
addMaxValues, canInternalizeNeighbour, canMakeNfa, ensureSorted, ensureSortedUnique, getField, getNfa, getNfaTwoWay, inf, internalizeNeighbour, inverted, isSingleTokenNot, log, matchesEmptySequence, optimize, producesSingleTokens, setQueryInfo, wrap
public static final int defaultMaxEdits
public static final int defaultPrefixLength
public SpanFuzzyQuery(org.apache.lucene.index.Term term)
public SpanFuzzyQuery(org.apache.lucene.index.Term term, int maxEdits, int prefixLength)
public BLSpanQuery rewrite(org.apache.lucene.index.IndexReader reader) throws IOException
rewrite
in class BLSpanQuery
IOException
public BLSpanWeight createWeight(org.apache.lucene.search.IndexSearcher searcher, boolean needsScores) throws IOException
createWeight
in class BLSpanQuery
IOException
public String getRealField()
getRealField
in class BLSpanQuery
public String toString(String field)
field
as the default field for
terms.
The representation used is one that is supposed to be readable by org.apache.lucene.queryParser.QueryParser.QueryParser. However, there are the following limitations:
toString
in class BLSpanQuery
field
- public boolean equals(Object o)
equals
in class BLSpanQuery
public int hashCode()
hashCode
in class BLSpanQuery
public boolean hitsAllSameLength()
BLSpanQuery
hitsAllSameLength
in class BLSpanQuery
public int hitsLengthMin()
BLSpanQuery
hitsLengthMin
in class BLSpanQuery
public int hitsLengthMax()
BLSpanQuery
hitsLengthMax
in class BLSpanQuery
public boolean hitsEndPointSorted()
BLSpanQuery
hitsEndPointSorted
in class BLSpanQuery
public boolean hitsStartPointSorted()
BLSpanQuery
hitsStartPointSorted
in class BLSpanQuery
public boolean hitsHaveUniqueStart()
BLSpanQuery
hitsHaveUniqueStart
in class BLSpanQuery
public boolean hitsHaveUniqueEnd()
BLSpanQuery
hitsHaveUniqueEnd
in class BLSpanQuery
public boolean hitsAreUnique()
BLSpanQuery
hitsAreUnique
in class BLSpanQuery
public long reverseMatchingCost(org.apache.lucene.index.IndexReader reader)
BLSpanQuery
reverseMatchingCost
in class BLSpanQuery
reader
- the index readerpublic int forwardMatchingCost()
BLSpanQuery
forwardMatchingCost
in class BLSpanQuery
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.