org.sourceforge.beanindex.store.writer
Class RAMDictionaryWriter
java.lang.Object
org.sourceforge.beanindex.store.writer.DictionaryWriter
org.sourceforge.beanindex.store.writer.RAMDictionaryWriter
- public class RAMDictionaryWriter
- extends DictionaryWriter
Method Summary |
void |
add(int beanId,
java.lang.String keywords,
java.lang.reflect.Field field,
int fieldIndex,
java.lang.String indexName)
Adds the keywords to dictionary and the bean id to the applicable
inverted index nodes. |
void |
close()
closes the data files.Before closing writes the terms data into
dictionary.dat file and writes all the inverted index file data into c
corresponding files ending with ***invx_x.dat and ***invx.lcx |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RAMDictionaryWriter
public RAMDictionaryWriter(java.lang.String path,
java.lang.String[] indexNames)
throws java.lang.Exception
- Parameters:
path
- indexNames
-
- Throws:
java.lang.Exception
add
public void add(int beanId,
java.lang.String keywords,
java.lang.reflect.Field field,
int fieldIndex,
java.lang.String indexName)
throws java.lang.Exception
- Adds the keywords to dictionary and the bean id to the applicable
inverted index nodes.
- Specified by:
add
in class DictionaryWriter
- Parameters:
beanId
- keywords
- field
- fieldIndex
- indexName
-
- Throws:
java.lang.Exception
close
public void close()
throws java.lang.Exception
- closes the data files.Before closing writes the terms data into
dictionary.dat file and writes all the inverted index file data into c
corresponding files ending with ***invx_x.dat and ***invx.lcx
- Specified by:
close
in class DictionaryWriter
- Throws:
java.lang.Exception