Package | Description |
---|---|
org.apache.lucene.search.suggest.tst |
Ternary Search Tree based autosuggest.
|
Modifier and Type | Method and Description |
---|---|
TernaryTreeNode |
TSTAutocomplete.insert(TernaryTreeNode currentNode,
java.lang.CharSequence s,
java.lang.Object val,
int x)
Inserts a key in TST creating a series of Binary Search Trees at each node.
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<TernaryTreeNode> |
TSTAutocomplete.prefixCompletion(TernaryTreeNode root,
java.lang.CharSequence s,
int x)
Auto-completes a given prefix query using Depth-First Search with the end
of prefix as source node each time finding a new leaf to get a complete key
to be added in the suggest list.
|
Modifier and Type | Method and Description |
---|---|
void |
TSTAutocomplete.balancedTree(java.lang.Object[] tokens,
java.lang.Object[] vals,
int lo,
int hi,
TernaryTreeNode root)
Inserting keys in TST in the order middle,small,big (lexicographic measure)
recursively creates a balanced tree which reduces insertion and search
times significantly.
|
TernaryTreeNode |
TSTAutocomplete.insert(TernaryTreeNode currentNode,
java.lang.CharSequence s,
java.lang.Object val,
int x)
Inserts a key in TST creating a series of Binary Search Trees at each node.
|
java.util.ArrayList<TernaryTreeNode> |
TSTAutocomplete.prefixCompletion(TernaryTreeNode root,
java.lang.CharSequence s,
int x)
Auto-completes a given prefix query using Depth-First Search with the end
of prefix as source node each time finding a new leaf to get a complete key
to be added in the suggest list.
|
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.