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
IOException
int getNumWords() throws IOException
IOException
IQueryResult[] query(String word) throws IOException
IOException
IEntryResult[] queryEntries(char[] pattern) throws IOException
IOException
IQueryResult[] queryInDocumentNames(String word) throws IOException
IOException
IQueryResult[] queryPrefix(char[] prefix) throws IOException
IOException
void close()
void setDoCache(boolean doCache)
doCache
- Copyright © 2019. All rights reserved.