mirror of https://github.com/apache/lucene.git
SOLR-2474: The helper TokenStreams in analysis.jsp and AnalysisRequestHandlerBase did not clear all attributes so they displayed incorrect attribute values for tokens in later filter stages
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1095521 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
affaa37983
commit
20f261ca14
|
@ -291,6 +291,10 @@ Bug Fixes
|
||||||
* SOLR-2390: Performance of usePhraseHighlighter is terrible on very large Documents,
|
* SOLR-2390: Performance of usePhraseHighlighter is terrible on very large Documents,
|
||||||
regardless of hl.maxDocCharsToAnalyze. (Mark Miller)
|
regardless of hl.maxDocCharsToAnalyze. (Mark Miller)
|
||||||
|
|
||||||
|
* SOLR-2474: The helper TokenStreams in analysis.jsp and AnalysisRequestHandlerBase
|
||||||
|
did not clear all attributes so they displayed incorrect attribute values for tokens
|
||||||
|
in later filter stages. (uschindler, rmuir, yonik)
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -337,6 +337,7 @@ public abstract class AnalysisRequestHandlerBase extends RequestHandlerBase {
|
||||||
@Override
|
@Override
|
||||||
public boolean incrementToken() throws IOException {
|
public boolean incrementToken() throws IOException {
|
||||||
if (tokenIterator.hasNext()) {
|
if (tokenIterator.hasNext()) {
|
||||||
|
clearAttributes();
|
||||||
AttributeSource next = tokenIterator.next();
|
AttributeSource next = tokenIterator.next();
|
||||||
Iterator<Class<? extends Attribute>> atts = next.getAttributeClassesIterator();
|
Iterator<Class<? extends Attribute>> atts = next.getAttributeClassesIterator();
|
||||||
while (atts.hasNext()) // make sure all att impls in the token exist here
|
while (atts.hasNext()) // make sure all att impls in the token exist here
|
||||||
|
|
|
@ -222,6 +222,7 @@
|
||||||
|
|
||||||
public boolean incrementToken() throws IOException {
|
public boolean incrementToken() throws IOException {
|
||||||
if (iter.hasNext()) {
|
if (iter.hasNext()) {
|
||||||
|
clearAttributes();
|
||||||
AttributeSource token = iter.next();
|
AttributeSource token = iter.next();
|
||||||
Iterator<Class<? extends Attribute>> atts = token.getAttributeClassesIterator();
|
Iterator<Class<? extends Attribute>> atts = token.getAttributeClassesIterator();
|
||||||
while (atts.hasNext()) // make sure all att impls in the token exist here
|
while (atts.hasNext()) // make sure all att impls in the token exist here
|
||||||
|
|
Loading…
Reference in New Issue