Class LuceneIndexTransformer
- java.lang.Object
-
- org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
-
- org.aksw.palmetto.corpus.lucene.creation.LuceneIndexTransformer
-
public class LuceneIndexTransformer extends AbstractLuceneIndexCreator
This class creates a simpler boolean document index based on a position storing index. Most users won't find this class helpful since it has only been created for a special situation, i.e., a user has a (large) position storing index and want to transform it into a faster boolean document index.- Author:
- Michael Röder (roeder@informatik.uni-leipzig.de)
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGGER-
Fields inherited from class org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
commitInterval, DEFAULT_COMMIT_INTERVAL, textFieldName, version
-
-
Constructor Summary
Constructors Constructor Description LuceneIndexTransformer(String fieldName)Constructor.LuceneIndexTransformer(String textFieldName, int commitInterval)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancreateIndex(File posIndexPath, File booleanIndexPath, Set<String> whiteList)Creates the index.Set<String>createWhiteList(File bpIndexPath)static voidmain(String[] args)-
Methods inherited from class org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
addDocumentLength, getCommitInterval, getTextFieldName, setCommitInterval, toLuceneDocument
-
-
-
-
Constructor Detail
-
LuceneIndexTransformer
public LuceneIndexTransformer(String fieldName)
Constructor.- Parameters:
fieldName- The name of the field in which the document texts are stored.
-
LuceneIndexTransformer
public LuceneIndexTransformer(String textFieldName, int commitInterval)
Constructor.- Parameters:
textFieldName- The name of the field in which the document texts are stored.commitInterval- The interval in which changes are committed to the index.
-
-
Method Detail
-
createIndex
public boolean createIndex(File posIndexPath, File booleanIndexPath, Set<String> whiteList)
Creates the index.- Parameters:
indexPath- The path to the director in which the Lucene index will be createddocIterator- Iterator that iterates over the document texts.- Returns:
- true if the creation was successful, else false.
-
createWhiteList
public Set<String> createWhiteList(File bpIndexPath) throws IOException
- Throws:
IOException
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-