|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.exist.storage.TextSearchEngine
This is the base class for all classes providing access to the fulltext index. The class has methods to add text and attribute nodes to the fulltext index, or to search for nodes matching selected search terms.
Field Summary | |
protected DBBroker |
broker
|
protected Configuration |
config
|
protected boolean |
indexNumbers
|
protected boolean |
stem
|
protected PorterStemmer |
stemmer
|
protected java.util.TreeSet |
stoplist
|
protected Tokenizer |
tokenizer
|
Constructor Summary | |
TextSearchEngine(DBBroker broker,
Configuration conf)
Construct a new instance and configure it. |
Method Summary | |
abstract void |
close()
|
abstract void |
flush()
|
abstract NodeSet[] |
getNodesContaining(DocumentSet doc,
java.lang.String[] expr)
For each of the given search terms and each of the documents in the document set, return a node-set of matching nodes. |
abstract NodeSet[] |
getNodesContaining(DocumentSet docs,
java.lang.String[] expr,
int type)
For each of the given search terms and each of the documents in the document set, return a node-set of matching nodes. |
Tokenizer |
getTokenizer()
Returns the Tokenizer used for tokenizing strings into words. |
abstract void |
reindex(DocumentImpl oldDoc,
NodeImpl node)
Reindex a document or node. |
abstract void |
removeCollection(Collection collection)
Remove index entries for an entire collection. |
abstract void |
removeDocument(DocumentImpl doc)
Remove all index entries for the given document. |
abstract Occurrences[] |
scanIndexTerms(User user,
Collection collection,
java.lang.String start,
java.lang.String end,
boolean inclusive)
Scan the fulltext index and return an Occurrences object for each of the index keys. |
abstract void |
storeAttribute(IndexPaths idx,
AttrImpl text)
Tokenize and index the given attribute node. |
abstract void |
storeText(IndexPaths idx,
TextImpl text)
Tokenize and index the given text node. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.TreeSet stoplist
protected DBBroker broker
protected Tokenizer tokenizer
protected Configuration config
protected boolean indexNumbers
protected boolean stem
protected PorterStemmer stemmer
Constructor Detail |
public TextSearchEngine(DBBroker broker, Configuration conf)
broker
- conf
- Method Detail |
public Tokenizer getTokenizer()
public abstract void storeText(IndexPaths idx, TextImpl text)
idx
- text
- public abstract void storeAttribute(IndexPaths idx, AttrImpl text)
idx
- text
- public abstract void flush()
public abstract void close()
public abstract NodeSet[] getNodesContaining(DocumentSet doc, java.lang.String[] expr)
doc
- expr
-
public abstract NodeSet[] getNodesContaining(DocumentSet docs, java.lang.String[] expr, int type)
expr
-
public abstract Occurrences[] scanIndexTerms(User user, Collection collection, java.lang.String start, java.lang.String end, boolean inclusive) throws PermissionDeniedException
user
- collection
- start
- end
- inclusive
-
PermissionDeniedException
public abstract void removeCollection(Collection collection)
collection
- public abstract void removeDocument(DocumentImpl doc)
doc
- public abstract void reindex(DocumentImpl oldDoc, NodeImpl node)
oldDoc
- node
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |