|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcolibri.extensions.textual.lucene.LuceneIndex
public class LuceneIndex
This class wraps the Lucene inverted terms index.
This structure stores in which documents appears a word.
It also mantains a hash table that allows to retrieve a document form the index given its ID.
There are two ways to store the index:
Constructor Summary | |
---|---|
LuceneIndex(java.util.Collection<LuceneDocument> documents)
Creates an index stored into memory. |
|
LuceneIndex(java.io.File directory,
java.util.Collection<LuceneDocument> documents)
Creates a LuceneIndex stored in the File System. |
Method Summary | |
---|---|
org.apache.lucene.store.Directory |
getDirectory()
|
LuceneDocument |
getDocument(java.lang.String docId)
|
int |
getNumberOfDocuments()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LuceneIndex(java.io.File directory, java.util.Collection<LuceneDocument> documents)
directory
- to store the index once generateddocuments
- to indexpublic LuceneIndex(java.util.Collection<LuceneDocument> documents)
documents
- to index.Method Detail |
---|
public org.apache.lucene.store.Directory getDirectory()
public int getNumberOfDocuments()
public LuceneDocument getDocument(java.lang.String docId)
|
GAIA - Group for Artificial Intelligence Applications http://gaia.fdi.ucm.es |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |