|
Xindice API version 1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Indexer is the abstract indexing interface for Xindice. An Indexer
object is implemented in order to retrieve and manage indexes.
Any number of Indexer instances may be associated with a single
Collection. The type of Indexer utilized by a query depends on
the 'Style' of Indexer and the type of QueryResolver that is being
used to performt he query. Currently, Xindice only internally
supports one kind of Indexer: 'XPath'.
Field Summary | |
static String |
STYLE_FULLTEXT
|
static String |
STYLE_NODENAME
|
static String |
STYLE_NODEVALUE
|
Method Summary | |
void |
add(String value,
Key key,
int pos,
int len,
short elemID,
short attrID)
add adds a Document to the Indexer. |
void |
flush()
flush forcefully flushes any unwritten buffers to disk. |
String |
getIndexStyle()
getIndexStyle returns the Index style. |
String |
getPattern()
getPattern returns the pattern recognized by this Indexer. |
IndexMatch[] |
queryMatches(IndexQuery query)
queryMatches retrieves a set of IndexMatch instances that match the supplied query. |
void |
remove(String value,
Key key,
int pos,
int len,
short elemID,
short attrID)
remove removes all references to the specified Key from the Indexer. |
void |
setCollection(Collection collection)
setCollection tells the Indexer who its parent is. |
Methods inherited from interface org.apache.xindice.util.Named |
getName |
Methods inherited from interface org.apache.xindice.core.DBObject |
close, create, drop, exists, isOpened, open |
Methods inherited from interface org.apache.xindice.util.Configurable |
getConfig, setConfig |
Field Detail |
public static final String STYLE_NODENAME
public static final String STYLE_NODEVALUE
public static final String STYLE_FULLTEXT
Method Detail |
public void setCollection(Collection collection)
collection
- The owner Collectionpublic String getIndexStyle()
public String getPattern()
contact@name Indexes all contacts by name attribute memo Indexes the text of all memo elements contact@* Indexes all contact attributes *@name Indexes the name attribute for all elements * Indexes the text of all elements *@* Indexes all attributes of all elementsThese patterns are used by the IndexManager when handling SAX events. All events that match the specified pattern will result in an add or remove call to the Indexer.
public void remove(String value, Key key, int pos, int len, short elemID, short attrID) throws DBException
value
- The value to removekey
- The Object IDpos
- The offset into the stream the Element occurs atlen
- The length of the substream for the ElementelemID
- The Element ID of the valueattrID
- The Attribute ID of the value (if any, else -1)public void add(String value, Key key, int pos, int len, short elemID, short attrID) throws DBException
value
- The value to removekey
- The Object IDpos
- The offset into the stream the Element occurs atlen
- The length of the substream for the ElementelemID
- The Element ID of the valueattrID
- The Attribute ID of the value (if any, else -1)public IndexMatch[] queryMatches(IndexQuery query) throws DBException
query
- The IndexQuery to usepublic void flush() throws DBException
|
Xindice API version 1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |