Method GetTokenStream
GetTokenStream(String, TextReader)
Returns a TokenStream suitable for fieldName
, tokenizing
the contents of text
.
This method uses CreateComponents(String, TextReader) to obtain an instance of TokenStreamComponents. It returns the sink of the components and stores the components internally. Subsequent calls to this method will reuse the previously stored components after resetting them through SetReader(TextReader).
NOTE: After calling this method, the consumer must follow the workflow described in TokenStream to properly consume its contents. See the Lucene.Net.Analysis namespace documentation for some examples demonstrating this.
Declaration
public TokenStream GetTokenStream(string fieldName, TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName | the name of the field the created TokenStream is used for |
TextReader | reader | the reader the streams source reads from |
Returns
Type | Description |
---|---|
TokenStream | TokenStream for iterating the analyzed content of |
See Also
GetTokenStream(String, String)
Returns a TokenStream suitable for fieldName
, tokenizing
the contents of text
.
This method uses CreateComponents(String, TextReader) to obtain an instance of TokenStreamComponents. It returns the sink of the components and stores the components internally. Subsequent calls to this method will reuse the previously stored components after resetting them through SetReader(TextReader).
NOTE: After calling this method, the consumer must follow the workflow described in TokenStream to properly consume its contents. See the Lucene.Net.Analysis namespace documentation for some examples demonstrating this.
Declaration
public TokenStream GetTokenStream(string fieldName, string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName | the name of the field the created TokenStream is used for |
System.String | text | the |
Returns
Type | Description |
---|---|
TokenStream | TokenStream for iterating the analyzed content of |