lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1350) SnowballFilter resets the payload
Date Tue, 05 Aug 2008 16:16:51 GMT

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

Doron Cohen commented on LUCENE-1350:
-------------------------------------

These are interesting points to consider. 

Let's look at the two cases reuse and non-reuse.

The current SnowballFilter implements the non-reuse method next(). It actually clones,  just
without using clone(). So I still think that fixing it to use clone is acceptable. Hope you
agree with this.

(Btw, I checked LUCENE-1142 ("Updated Snowball package") - there too the non-reuse version
is used.)

For the reuse case, i.e. next(Token), there is a distinction between *consumers* and *producers*
(in TokenStream API) - only consumers invoke clear(), and then set everything. Filters are
consumers, so clear() is not in place. 

(As a side comment, I think an explicit call like setEndOffset() is somewhat clearer than
a method with 3 int args.)

> SnowballFilter resets the payload
> ---------------------------------
>
>                 Key: LUCENE-1350
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1350
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Analysis, contrib/*
>            Reporter: Doron Cohen
>            Assignee: Doron Cohen
>         Attachments: LUCENE-1350.patch
>
>
> Passing tokens with payloads through SnowballFilter results in tokens with no payloads.
> A workaround for this is to apply stemming first and only then run whatever logic creates
the payload, but this is not always convenient.
> Patch to follow that preserves the payload.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message