You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Sujit Pal <sp...@healthline.com> on 2011/06/22 20:53:23 UTC

Suggestion: make some more TokenFilters KeywordAttribute aware

Hello,

I am currently in need of a LowerCaseFilter and StopFilter that will
recognize KeywordAttribute, similar to the way PorterStemFilter
currently does (on trunk). Specifically, in case the term is a
KeywordAttribute.isKeyword(), it should not lowercase and remove
respectively.

This can be achieved without breaking backward compatibility by
introducing an extra constructor which takes a boolean ignoreKeyword
parameter.

If this sounds like this would be a good idea, please let me know, I can
open a JIRA and attach a patch. Currently, I have created my own
versions of KeywordAwareXXX filters that does pretty much the same
thing.

Thanks
Sujit



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


Re: Suggestion: make some more TokenFilters KeywordAttribute aware

Posted by Sujit Pal <sp...@healthline.com>.
Thanks Simon, I have opened a JIRA and attached a patch. I have verified
that I haven't broken anything, and I have used these patched files to
test in my local application and have verified that they work.

https://issues.apache.org/jira/browse/LUCENE-3236 

-sujit

On Thu, 2011-06-23 at 08:21 +0200, Simon Willnauer wrote:
> On Wed, Jun 22, 2011 at 8:53 PM, Sujit Pal <sp...@healthline.com> wrote:
> > Hello,
> >
> > I am currently in need of a LowerCaseFilter and StopFilter that will
> > recognize KeywordAttribute, similar to the way PorterStemFilter
> > currently does (on trunk). Specifically, in case the term is a
> > KeywordAttribute.isKeyword(), it should not lowercase and remove
> > respectively.
> >
> > This can be achieved without breaking backward compatibility by
> > introducing an extra constructor which takes a boolean ignoreKeyword
> > parameter.
> >
> > If this sounds like this would be a good idea, please let me know, I can
> > open a JIRA and attach a patch. Currently, I have created my own
> > versions of KeywordAwareXXX filters that does pretty much the same
> > thing.
> 
> I think you should open an issue and take it from there. I can't
> promise this is going to be added but its worth to try!
> 
> please go ahead and open an issue.
> 
> simon
> >
> > Thanks
> > Sujit
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 


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


Re: Suggestion: make some more TokenFilters KeywordAttribute aware

Posted by Simon Willnauer <si...@googlemail.com>.
On Wed, Jun 22, 2011 at 8:53 PM, Sujit Pal <sp...@healthline.com> wrote:
> Hello,
>
> I am currently in need of a LowerCaseFilter and StopFilter that will
> recognize KeywordAttribute, similar to the way PorterStemFilter
> currently does (on trunk). Specifically, in case the term is a
> KeywordAttribute.isKeyword(), it should not lowercase and remove
> respectively.
>
> This can be achieved without breaking backward compatibility by
> introducing an extra constructor which takes a boolean ignoreKeyword
> parameter.
>
> If this sounds like this would be a good idea, please let me know, I can
> open a JIRA and attach a patch. Currently, I have created my own
> versions of KeywordAwareXXX filters that does pretty much the same
> thing.

I think you should open an issue and take it from there. I can't
promise this is going to be added but its worth to try!

please go ahead and open an issue.

simon
>
> Thanks
> Sujit
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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