You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2013/08/10 20:10:47 UTC

[jira] [Updated] (LUCENE-5165) Add SuggestStopFilter

     [ https://issues.apache.org/jira/browse/LUCENE-5165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-5165:
---------------------------------------

    Attachment: LUCENE-5165.patch

Patch, I think it's ready... it [sneakily] calls end() from its
incrementToken and then looks at the final endOffset to decide whether
to filter the stopword or not.

I've pushed it to http://jirasearch.mikemccandless.com and now "fail
if byte" gets the right suggestion (before it got no suggestions,
because I was previously keeping stop words at lookup time to
workaround the issue).

                
> Add SuggestStopFilter
> ---------------------
>
>                 Key: LUCENE-5165
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5165
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/spellchecker
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 5.0, 4.5
>
>         Attachments: LUCENE-5165.patch
>
>
> This is like StopFilter, except if the token is the very last token
> and there were no non-token characters after it, it keeps the token.
> This is useful with analyzing suggesters (AnalyzingSuggester,
> AnalyzingInfixSuggester, FuzzySuggester), where you often want to
> remove stop words, but not if it's the last word and the user hasn't
> finished typing it.
> E.g. "fast a" might complete to "fast amoeba", but if you simply use
> StopFilter then the a is removed.
> Really our analysis APIs aren't quite designed to handle a "partial"
> tokens that suggesters need to work with.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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