|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.dom.Match
public abstract class Match
Used to track fulltext matches throughout the query.
TextSearchEngine
will add a
match object to every NodeProxy
that triggered a fulltext match for every term matched. The
Match object contains the nodeId of the text node that triggered the
match, the string value of the matching term and a frequency count,
indicating the frequency of the matching term string within the corresponding
single text node.
All path operations copy existing match objects, i.e. the match objects
are copied to the selected descendant or child nodes. This means that
every NodeProxy being the direct or indirect result of a fulltext
selection will have one or more match objects, indicating which text nodes
among its descendant nodes contained a fulltext match.
Nested Class Summary | |
---|---|
static class |
Match.Offset
|
Method Summary | |
---|---|
void |
addOffset(int offset,
int length)
|
int |
compareTo(Object o)
Used to sort matches. |
abstract Match |
createInstance(int contextId,
NodeId nodeId,
String matchTerm)
|
boolean |
equals(Object other)
|
int |
getContextId()
|
int |
getFrequency()
|
abstract String |
getIndexId()
|
String |
getMatchTerm()
|
Match |
getNextMatch()
|
NodeId |
getNodeId()
|
Match.Offset |
getOffset(int pos)
|
boolean |
hasMatchAround(int pos)
Returns true if the given position is within a match. |
boolean |
hasMatchAt(int pos)
Return true if there's a match starting at the given character position. |
Match |
isAfter(Match other)
|
boolean |
matchEquals(Match other)
|
void |
mergeOffsets(Match other)
|
abstract Match |
newCopy()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public NodeId getNodeId()
public int getFrequency()
public String getMatchTerm()
public int getContextId()
public abstract Match createInstance(int contextId, NodeId nodeId, String matchTerm)
public abstract Match newCopy()
public abstract String getIndexId()
public void addOffset(int offset, int length)
public Match.Offset getOffset(int pos)
public Match isAfter(Match other)
public boolean hasMatchAt(int pos)
pos
- the position
public boolean hasMatchAround(int pos)
pos
- the position
public void mergeOffsets(Match other)
public Match getNextMatch()
public boolean equals(Object other)
equals
in class Object
public boolean matchEquals(Match other)
public int compareTo(Object o)
compareTo
in interface Comparable
Comparable.compareTo(java.lang.Object)
public String toString()
toString
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |