Method KeywordTokenStream
KeywordTokenStream<T>(ICollection<T>)
Convenience method; Creates and returns a token stream that generates a token for each keyword in the given collection, "as is", without any transforming text analysis. The resulting token stream can be fed into AddField(String, TokenStream), perhaps wrapped into another TokenFilter, as desired.
Declaration
public virtual TokenStream KeywordTokenStream<T>(ICollection<T> keywords)
Parameters
Type | Name | Description |
---|---|---|
ICollection<T> | keywords | the keywords to generate tokens for |
Returns
Type | Description |
---|---|
TokenStream | the corresponding token stream |
Type Parameters
Name | Description |
---|---|
T |