New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Analyzer.tokenStream(fieldName, text) instead of Analyzer.tokenStream(fieldName, new FastStringReader(text)) #3409

Closed
jpountz opened this Issue Jul 30, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@jpountz
Contributor

jpountz commented Jul 30, 2013

Lucene 4.4 introduced the tokenStream(String fieldName, String text) helper method which nicely reuses the string reader. Whenever analyzing Strings, we should use this method instead of using the Reader method with a FastStringReader.

@s1monw

This comment has been minimized.

Show comment
Hide comment
@s1monw

s1monw Jul 30, 2013

Contributor

+1

Contributor

s1monw commented Jul 30, 2013

+1

@jpountz jpountz closed this in daf7e04 Jul 30, 2013

jpountz added a commit that referenced this issue Jul 30, 2013

Use Analyzer.tokenStream(fieldName, text) instead of Analyzer.tokenSt…
…ream(fieldName, new StringReader(text)).

Lucene 4.4 introduced the tokenStream(String fieldName, String text) helper
method which nicely reuses the string reader. Whenever analyzing Strings, we
should use this method instead of using the Reader method with a
(Fast)StringReader.

Closes #3409

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Use Analyzer.tokenStream(fieldName, text) instead of Analyzer.tokenSt…
…ream(fieldName, new StringReader(text)).

Lucene 4.4 introduced the tokenStream(String fieldName, String text) helper
method which nicely reuses the string reader. Whenever analyzing Strings, we
should use this method instead of using the Reader method with a
(Fast)StringReader.

Closes elastic#3409
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment