public class FSOMapFileLexicon extends MapLexicon
Index Properties:
Modifier and Type | Class and Description |
---|---|
static class |
FSOMapFileLexicon.MapFileLexiconEntryIterator
Iterate through the values in order
|
static class |
FSOMapFileLexicon.MapFileLexiconIterator
An iterator over the lexicon
|
MapLexicon.Id2EntryIndexLookup, MapLexicon.IdIsIndex
keyFactory, map, modificationLock
Constructor and Description |
---|
FSOMapFileLexicon(String structureName,
IndexOnDisk index)
Construct a new FSOMapFileLexicon
|
FSOMapFileLexicon(String structureName,
String path,
String prefix,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
FixedSizeWriteableFactory<LexiconEntry> _valueFactory,
String termIdLookup,
String termLookup,
String dataFile)
Construct an instance of the class with
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
static String |
constructFilename(String structureName,
String path,
String prefix,
String extension)
Constructs a filename
|
static void |
deleteMapFileLexicon(String structureName,
String path,
String prefix)
Delete a FSOMapFileLexicon within the specified index location
|
Iterator<Map.Entry<String,LexiconEntry>> |
iterator() |
static void |
optimise(String structureName,
IndexOnDisk index,
LexiconBuilder.CollectionStatisticsCounter statsCounter)
Does two things to a FSOMapFileLexicon: adds the termid lookup file (if required),
and also creates the lexicon has file.
|
static void |
optimise(String structureName,
IndexOnDisk index,
LexiconBuilder.CollectionStatisticsCounter statsCounter,
int numEntries)
optimise
|
static void |
renameMapFileLexicon(String SrcStructureName,
String SrcPath,
String SrcPrefix,
String destStructureName,
String destPath,
String destPrefix)
Rename a FSOMapFileLexicon within the specified index location
|
getIthLexiconEntry, getLexiconEntry, getLexiconEntry, getLexiconEntryRange, numberOfEntries, setTermIdLookup
public FSOMapFileLexicon(String structureName, IndexOnDisk index) throws IOException
IOException
public FSOMapFileLexicon(String structureName, String path, String prefix, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory, FixedSizeWriteableFactory<LexiconEntry> _valueFactory, String termIdLookup, String termLookup, String dataFile) throws IOException
structureName
- path
- prefix
- _keyFactory
- _valueFactory
- termIdLookup
- termLookup
- dataFile
- IOException
public void close() throws IOException
MapLexicon
close
in interface Closeable
close
in interface AutoCloseable
close
in class MapLexicon
IOException
public Iterator<Map.Entry<String,LexiconEntry>> iterator()
public static void optimise(String structureName, IndexOnDisk index, LexiconBuilder.CollectionStatisticsCounter statsCounter) throws IOException
structureName
- - name of the index structure that this FSOMapFileLexicon representsindex
- - the index that the index belongsIOException
- if an IO problem occurspublic static void optimise(String structureName, IndexOnDisk index, LexiconBuilder.CollectionStatisticsCounter statsCounter, int numEntries) throws IOException
structureName
- index
- statsCounter
- numEntries
- IOException
public static String constructFilename(String structureName, String path, String prefix, String extension)
structureName
- path
- prefix
- extension
- public static void renameMapFileLexicon(String SrcStructureName, String SrcPath, String SrcPrefix, String destStructureName, String destPath, String destPrefix)
Terrier 4.0. Copyright © 2004-2014 University of Glasgow