org.exist.dom
Class Match
java.lang.Object
org.exist.dom.Match
- All Implemented Interfaces:
- java.lang.Comparable
- public class Match
- extends java.lang.Object
- implements java.lang.Comparable
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.
- Author:
- wolf
|
Constructor Summary |
Match(long nodeId,
java.lang.String matchTerm)
|
Match(long nodeId,
java.lang.String matchTerm,
int frequency)
|
Match(Match match)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nextMatch
protected Match nextMatch
prevMatch
protected Match prevMatch
Match
public Match(long nodeId,
java.lang.String matchTerm)
Match
public Match(long nodeId,
java.lang.String matchTerm,
int frequency)
Match
public Match(Match match)
getNodeId
public long getNodeId()
getFrequency
public int getFrequency()
addOffset
public void addOffset(int offset,
int length)
getOffset
public Match.Offset getOffset(int pos)
getNextMatch
public Match getNextMatch()
equals
public boolean equals(java.lang.Object other)
compareTo
public int compareTo(java.lang.Object o)
- Used to sort matches. Terms are compared by their string
length to have the longest string first.
- Specified by:
compareTo in interface java.lang.Comparable
- See Also:
Comparable.compareTo(java.lang.Object)
<oXygen/>
XML Editor
provides support for editing and debugging XQuery
expressions against the eXist XML Database.