Package | Description |
---|---|
org.apache.lucene.analysis |
API and code to convert text into indexable/searchable tokens.
|
org.apache.lucene.analysis.miscellaneous |
Miscellaneous TokenStreams
|
org.apache.lucene.analysis.shingle |
Word n-gram filters
|
org.apache.lucene.search.highlight |
The highlight package contains classes to provide "keyword in context" features
typically used to highlight search terms in the text of results pages.
|
Modifier and Type | Method and Description |
---|---|
Token |
Token.clone(char[] newTermBuffer,
int newTermOffset,
int newTermLength,
int newStartOffset,
int newEndOffset)
Makes a clone, but replaces the term buffer &
start/end offset in the process.
|
Token |
Token.reinit(char[] newTermBuffer,
int newTermOffset,
int newTermLength,
int newStartOffset,
int newEndOffset)
Shorthand for calling
clear() ,
CharTermAttributeImpl.copyBuffer(char[], int, int) ,
setStartOffset(int) ,
setEndOffset(int)
setType(java.lang.String) on Token.DEFAULT_TYPE |
Token |
Token.reinit(char[] newTermBuffer,
int newTermOffset,
int newTermLength,
int newStartOffset,
int newEndOffset,
String newType)
Shorthand for calling
clear() ,
CharTermAttributeImpl.copyBuffer(char[], int, int) ,
setStartOffset(int) ,
setEndOffset(int) ,
setType(java.lang.String) |
Token |
Token.reinit(String newTerm,
int newStartOffset,
int newEndOffset)
Shorthand for calling
clear() ,
CharTermAttributeImpl.append(CharSequence) ,
setStartOffset(int) ,
setEndOffset(int)
setType(java.lang.String) on Token.DEFAULT_TYPE |
Token |
Token.reinit(String newTerm,
int newTermOffset,
int newTermLength,
int newStartOffset,
int newEndOffset)
Shorthand for calling
clear() ,
CharTermAttributeImpl.append(CharSequence, int, int) ,
setStartOffset(int) ,
setEndOffset(int)
setType(java.lang.String) on Token.DEFAULT_TYPE |
Token |
Token.reinit(String newTerm,
int newTermOffset,
int newTermLength,
int newStartOffset,
int newEndOffset,
String newType)
|
Token |
Token.reinit(String newTerm,
int newStartOffset,
int newEndOffset,
String newType)
Shorthand for calling
clear() ,
CharTermAttributeImpl.append(CharSequence) ,
setStartOffset(int) ,
setEndOffset(int)
setType(java.lang.String) |
Modifier and Type | Method and Description |
---|---|
void |
Token.reinit(Token prototype)
Copy the prototype token's fields into this one.
|
void |
Token.reinit(Token prototype,
char[] newTermBuffer,
int offset,
int length)
Copy the prototype token's fields into this one, with a different term.
|
void |
Token.reinit(Token prototype,
String newTerm)
Copy the prototype token's fields into this one, with a different term.
|
Constructor and Description |
---|
CannedTokenStream(Token... tokens) |
Modifier and Type | Method and Description |
---|---|
Token |
SingleTokenTokenStream.getToken() |
Token |
PrefixAndSuffixAwareTokenFilter.updateInputToken(Token inputToken,
Token lastPrefixToken) |
Token |
PrefixAwareTokenFilter.updateSuffixToken(Token suffixToken,
Token lastPrefixToken)
The default implementation adds last prefix token end offset to the suffix token start and end offsets.
|
Token |
PrefixAndSuffixAwareTokenFilter.updateSuffixToken(Token suffixToken,
Token lastInputToken) |
Modifier and Type | Method and Description |
---|---|
void |
SingleTokenTokenStream.setToken(Token token) |
Token |
PrefixAndSuffixAwareTokenFilter.updateInputToken(Token inputToken,
Token lastPrefixToken) |
Token |
PrefixAwareTokenFilter.updateSuffixToken(Token suffixToken,
Token lastPrefixToken)
The default implementation adds last prefix token end offset to the suffix token start and end offsets.
|
Token |
PrefixAndSuffixAwareTokenFilter.updateSuffixToken(Token suffixToken,
Token lastInputToken) |
Constructor and Description |
---|
SingleTokenTokenStream(Token token) |
Modifier and Type | Method and Description |
---|---|
List<Token> |
ShingleMatrixFilter.Matrix.Column.Row.getTokens() |
Modifier and Type | Method and Description |
---|---|
float |
ShingleMatrixFilter.calculateShingleWeight(Token shingleToken,
List<Token> shingle,
int currentPermutationStartOffset,
List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows,
List<Token> currentPermuationTokens)
Deprecated.
Evaluates the new shingle token weight.
|
abstract ShingleMatrixFilter.TokenPositioner |
ShingleMatrixFilter.TokenSettingsCodec.getTokenPositioner(Token token)
Retrieves information on how a
Token is to be inserted to a ShingleMatrixFilter.Matrix . |
ShingleMatrixFilter.TokenPositioner |
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.getTokenPositioner(Token token) |
ShingleMatrixFilter.TokenPositioner |
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.getTokenPositioner(Token token) |
ShingleMatrixFilter.TokenPositioner |
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.getTokenPositioner(Token token) |
abstract float |
ShingleMatrixFilter.TokenSettingsCodec.getWeight(Token token)
Have this method return 1f in order to 'disable' weights.
|
float |
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.getWeight(Token token) |
float |
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.getWeight(Token token) |
float |
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.getWeight(Token token)
Returns a 32 bit float from the payload, or 1f it null.
|
abstract void |
ShingleMatrixFilter.TokenSettingsCodec.setTokenPositioner(Token token,
ShingleMatrixFilter.TokenPositioner tokenPositioner)
Sets information on how a
Token is to be inserted to a ShingleMatrixFilter.Matrix . |
void |
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.setTokenPositioner(Token token,
ShingleMatrixFilter.TokenPositioner tokenPositioner) |
void |
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.setTokenPositioner(Token token,
ShingleMatrixFilter.TokenPositioner tokenPositioner) |
void |
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.setTokenPositioner(Token token,
ShingleMatrixFilter.TokenPositioner tokenPositioner)
Sets the TokenPositioner as token flags int value.
|
abstract void |
ShingleMatrixFilter.TokenSettingsCodec.setWeight(Token token,
float weight)
Have this method do nothing in order to 'disable' weights.
|
void |
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.setWeight(Token token,
float weight) |
void |
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.setWeight(Token token,
float weight) |
void |
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.setWeight(Token token,
float weight)
Stores a 32 bit float in the payload, or set it to null if 1f;
|
void |
ShingleMatrixFilter.updateToken(Token token,
List<Token> shingle,
int currentPermutationStartOffset,
List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows,
List<Token> currentPermuationTokens)
Deprecated.
Final touch of a shingle token before it is passed on to the consumer from method
ShingleMatrixFilter.incrementToken() . |
Modifier and Type | Method and Description |
---|---|
float |
ShingleMatrixFilter.calculateShingleWeight(Token shingleToken,
List<Token> shingle,
int currentPermutationStartOffset,
List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows,
List<Token> currentPermuationTokens)
Deprecated.
Evaluates the new shingle token weight.
|
float |
ShingleMatrixFilter.calculateShingleWeight(Token shingleToken,
List<Token> shingle,
int currentPermutationStartOffset,
List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows,
List<Token> currentPermuationTokens)
Deprecated.
Evaluates the new shingle token weight.
|
void |
ShingleMatrixFilter.Matrix.Column.Row.setTokens(List<Token> tokens) |
void |
ShingleMatrixFilter.updateToken(Token token,
List<Token> shingle,
int currentPermutationStartOffset,
List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows,
List<Token> currentPermuationTokens)
Deprecated.
Final touch of a shingle token before it is passed on to the consumer from method
ShingleMatrixFilter.incrementToken() . |
void |
ShingleMatrixFilter.updateToken(Token token,
List<Token> shingle,
int currentPermutationStartOffset,
List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows,
List<Token> currentPermuationTokens)
Deprecated.
Final touch of a shingle token before it is passed on to the consumer from method
ShingleMatrixFilter.incrementToken() . |
Constructor and Description |
---|
ShingleMatrixFilter.Matrix.Column(Token token) |
Modifier and Type | Method and Description |
---|---|
Token |
TokenGroup.getToken(int index) |