lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2901) KeywordMarkerFilter resets keyword attribute state to false for tokens not in protwords.txt
Date Sun, 30 Jan 2011 18:17:43 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988625#action_12988625
] 

Robert Muir commented on LUCENE-2901:
-------------------------------------

Honestly I didnt know the filter did what drew reported, or i would have raised this bug myself.

The problem is this is inconsistent even with the other filters that use keyword attribute.
Its more obvious with the decorator pattern that if you have:
{noformat}
KeywordFilter( { "dogs", "birds", "trees", "houses" })
{noformat}

That this is equivalent to:
{noformat}
KeywordFilter( { "dogs", "birds" } )
KeywordFilter( { "trees", "houses" })
{noformat}

This is how all the other tokenstreams work, e.g. StopFilter etc.


> KeywordMarkerFilter resets keyword attribute state to false for tokens not in protwords.txt
> -------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2901
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2901
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Analysis
>    Affects Versions: 3.1
>            Reporter: Drew Farris
>            Assignee: Robert Muir
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2901.patch
>
>
> KeywordMarkerFilter sets true or false for the KeywordAttribute on all tokens. This erases
previous state established further up the filter chain, for example in the case where a custom
filter wants to prevent a token from being stemmed. 
> If a token is already marked as a keyword (KeywordAttribute.isKeyword() == true), perhaps
the KeywordMarkerFilterFactory should not re-set the state to false.

-- 
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