public interface IIndex
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the index file if open
|
int |
getNumDocuments()
Returns the number of documents indexed.
|
int |
getNumWords()
Returns the number of unique words indexed.
|
IQueryResult[] |
query(String word)
Returns the paths of the documents containing the given word.
|
IEntryResult[] |
queryEntries(char[] pattern)
Returns all entries for a given word.
|
IQueryResult[] |
queryInDocumentNames(String word)
Returns the paths of the documents whose names contain the given word.
|
IQueryResult[] |
queryPrefix(char[] prefix)
Returns the paths of the documents containing the given word prefix.
|
void |
setDoCache(boolean doCache)
sets a boolean indicating the index file will be cached and should remain open and in-memory
|
int getNumDocuments()
throws IOException
IOExceptionint getNumWords()
throws IOException
IOExceptionIQueryResult[] query(String word) throws IOException
IOExceptionIEntryResult[] queryEntries(char[] pattern) throws IOException
IOExceptionIQueryResult[] queryInDocumentNames(String word) throws IOException
IOExceptionIQueryResult[] queryPrefix(char[] prefix) throws IOException
IOExceptionvoid close()
void setDoCache(boolean doCache)
doCache - Copyright © 2018 JBoss by Red Hat. All rights reserved.