Class ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
- java.lang.Object
-
- org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
-
- org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
-
- Enclosing class:
- ShingleMatrixFilter
public static class ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec extends ShingleMatrixFilter.TokenSettingsCodec
A codec that creates a two dimensional matrix by treating tokens from the input stream with 0 position increment as new rows to the current column.
-
-
Constructor Summary
Constructors Constructor Description TwoDimensionalNonWeightedSynonymTokenSettingsCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ShingleMatrixFilter.TokenPositionergetTokenPositioner(org.apache.lucene.analysis.Token token)Retrieves information on how aTokenis to be inserted to aShingleMatrixFilter.Matrix.floatgetWeight(org.apache.lucene.analysis.Token token)Have this method return 1f in order to 'disable' weights.voidsetTokenPositioner(org.apache.lucene.analysis.Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)Sets information on how aTokenis to be inserted to aShingleMatrixFilter.Matrix.voidsetWeight(org.apache.lucene.analysis.Token token, float weight)Have this method do nothing in order to 'disable' weights.
-
-
-
Method Detail
-
getTokenPositioner
public ShingleMatrixFilter.TokenPositioner getTokenPositioner(org.apache.lucene.analysis.Token token) throws IOException
Description copied from class:ShingleMatrixFilter.TokenSettingsCodecRetrieves information on how aTokenis to be inserted to aShingleMatrixFilter.Matrix.- Specified by:
getTokenPositionerin classShingleMatrixFilter.TokenSettingsCodec- Returns:
ShingleMatrixFilter.TokenPositioner- Throws:
IOException
-
setTokenPositioner
public void setTokenPositioner(org.apache.lucene.analysis.Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)Description copied from class:ShingleMatrixFilter.TokenSettingsCodecSets information on how aTokenis to be inserted to aShingleMatrixFilter.Matrix.- Specified by:
setTokenPositionerin classShingleMatrixFilter.TokenSettingsCodec
-
getWeight
public float getWeight(org.apache.lucene.analysis.Token token)
Description copied from class:ShingleMatrixFilter.TokenSettingsCodecHave this method return 1f in order to 'disable' weights.- Specified by:
getWeightin classShingleMatrixFilter.TokenSettingsCodec- Returns:
- the weight of parameter token
-
setWeight
public void setWeight(org.apache.lucene.analysis.Token token, float weight)Description copied from class:ShingleMatrixFilter.TokenSettingsCodecHave this method do nothing in order to 'disable' weights.- Specified by:
setWeightin classShingleMatrixFilter.TokenSettingsCodec
-
-