public class CharTrieIndex extends CharTrie
| Modifier and Type | Field and Description |
|---|---|
protected SerialArrayList<com.simiacryptus.util.text.CursorData> |
cursors |
protected ArrayList<String> |
documents |
godparentIndex, nodes, parentIndex| Constructor and Description |
|---|
CharTrieIndex() |
CharTrieIndex(CharTrieIndex copyFrom) |
| Modifier and Type | Method and Description |
|---|---|
CharTrie |
addAlphabet(String document) |
int |
addDictionary(String document)
Adds a document to be indexed.
|
int |
addDocument(String document)
Adds a document to be indexed.
|
CharTrieIndex |
copy() |
long |
getIndexedSize() |
int |
getMemorySize() |
CharTrieIndex |
index()
Creates the index tree using the accumulated documents
|
CharTrieIndex |
index(int maxLevels)
Creates the index tree using the accumulated documents
|
CharTrieIndex |
index(int maxLevels,
int minWeight)
Creates the index tree using the accumulated documents
|
static CharTrie |
indexFulltext(Collection<String> documents,
int maxLevels,
int minWeight) |
static CharTrie |
indexWords(Collection<String> documents,
int maxLevels,
int minWeight) |
IndexNode |
root() |
IndexNode |
traverse(String search)
Locate a node by finding the maximum prefix match with the given string
|
CharTrie |
truncate()
Removes cursor data, retaining only the tree of tokens and counts.
|
add, contains, divide, equals, getAnalyzer, getCodec, getGenerator, getNodeCount, hashCode, matchEnd, matchPredictor, max, product, reduce, reducer, reduceSimple, reverse, rewrite, tokens, toStreamprotected final SerialArrayList<com.simiacryptus.util.text.CursorData> cursors
public CharTrieIndex(CharTrieIndex copyFrom)
public CharTrieIndex()
public static CharTrie indexWords(Collection<String> documents, int maxLevels, int minWeight)
public static CharTrie indexFulltext(Collection<String> documents, int maxLevels, int minWeight)
public int getMemorySize()
getMemorySize in class CharTriepublic long getIndexedSize()
getIndexedSize in class CharTriepublic CharTrie truncate()
public CharTrieIndex index()
public CharTrieIndex index(int maxLevels)
maxLevels - - Maximum depth of the tree to buildpublic CharTrieIndex index(int maxLevels, int minWeight)
maxLevels - - Maximum depth of the tree to buildminWeight - - Minimum number of cursors for a node to be index using,
exclusive boundpublic int addDictionary(String document)
document - public int addDocument(String document)
document - public CharTrieIndex copy()
Copyright © 2017 SimiaCryptus Software. All rights reserved.