lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-2051) analysis.jsp is incorrect for protWords etc
Date Tue, 17 Aug 2010 09:37:16 GMT

    [ https://issues.apache.org/jira/browse/SOLR-2051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899358#action_12899358
] 

Uwe Schindler commented on SOLR-2051:
-------------------------------------

For performance reasons, I would move

{code}
final AttributeSource token = iter.next();
Iterator<Class<? extends Attribute>> atts = token.getAttributeClassesIterator();
while (atts.hasNext()) this.addAttribute(atts.next());
{code}

to the ctor of the helper tokenstream. This is the same how TeeSink and all other tokenstreams
work. Adding attributes later in the tokenstreams incrementToken() is not allowed, so you
can be sure that after the original tokenstreams ctor was executed all attributes are available.
Doing this on each incrementToken is the same like if indexer would do this on each incrementToken
call.

> analysis.jsp is incorrect for protWords etc
> -------------------------------------------
>
>                 Key: SOLR-2051
>                 URL: https://issues.apache.org/jira/browse/SOLR-2051
>             Project: Solr
>          Issue Type: Bug
>          Components: web gui
>    Affects Versions: 3.1, 4.0
>            Reporter: Robert Muir
>         Attachments: SOLR-2051.patch, SOLR-2051.patch, SOLR-2051.patch
>
>
> Analysis.jsp gives the incorrect results if you use "protwords.txt" or "stemdict.txt"
or the like.
> This is because this is now implemented with KeywordAttribute (so you can easily override
any stemmer etc).
> For example, if your schema had "foobars" in protwords.txt, analysis.jsp would show it
being stemmed to "foobar", even though this doesnt actually happen.
> The problem is that this jsp is downconverting the entire tokenstream to Token in between
processing, so it silently discards KeywordAttribute and you get the wrong result.
> Note: this issue isnt about *displaying* other attributes such as KeywordAttribute (which
would be a new feature). Its about not throwing them away so that the analysis actually represents
what happens.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message