You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ryan Yacyshyn <ry...@gmail.com> on 2018/03/09 04:43:42 UTC

Altering the query if query contains all stopwods

Hi all,

I'm wondering if its possible to change/alter the query after it has been
analyzed by the stopword filter?

For example, if my query contains all stopwords then I'll get zero results
because the query is empty. I'd like to have a condition to change the
query so that if the query happens to be completely blank after stopword
removal, then do a wildcard search.

Thanks,
Ryan

Re: Altering the query if query contains all stopwods

Posted by Ryan Yacyshyn <ry...@gmail.com>.
Alright, thanks.

Yeah, the SuggestStopFilterFactory gets closer but isn't what I'm looking
for in this case!

Ryan



On Sat, 10 Mar 2018 at 06:12 Rick Leir <rl...@leirtech.com> wrote:

> Tav, Ryan
> Now you have me wondering, should it be returning *:* or some general
> landing page.
>
> Suppose you had typeahead or autocomplete, it should ignore any stopwords
> list.
>
> By the way, people on this list have had good reasons why we should stop
> using stopwords.
> Cheers -- Rick
>
> On March 9, 2018 1:13:22 PM EST, tapan1707 <tv...@yahoo-corp.jp> wrote:
> >Hello Ryan,
> >Solr has a Filter class called solr.SuggestStopFilterFactory, which
> >basically works similar to solr.StopFilterFactory but with a slight
> >modification that if all of the words are present in stopwords.txt then
> >it
> >won't remove the last one.
> >I am not sure about wildcard search but if all of the query tokens are
> >stopwords.txt then at the very least it won't be returning the zero
> >results.(assuming that search results for the last word exists)
> >
> >
> >
> >--
> >Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>
> --
> Sorry for being brief. Alternate email is rickleir at yahoo dot com

Re: Altering the query if query contains all stopwods

Posted by Rick Leir <rl...@leirtech.com>.
Tav, Ryan
Now you have me wondering, should it be returning *:* or some general landing page.

Suppose you had typeahead or autocomplete, it should ignore any stopwords list.

By the way, people on this list have had good reasons why we should stop using stopwords.
Cheers -- Rick

On March 9, 2018 1:13:22 PM EST, tapan1707 <tv...@yahoo-corp.jp> wrote:
>Hello Ryan,
>Solr has a Filter class called solr.SuggestStopFilterFactory, which
>basically works similar to solr.StopFilterFactory but with a slight
>modification that if all of the words are present in stopwords.txt then
>it
>won't remove the last one. 
>I am not sure about wildcard search but if all of the query tokens are
>stopwords.txt then at the very least it won't be returning the zero
>results.(assuming that search results for the last word exists)  
>
>
>
>--
>Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

-- 
Sorry for being brief. Alternate email is rickleir at yahoo dot com 

Re: Altering the query if query contains all stopwods

Posted by tapan1707 <tv...@yahoo-corp.jp>.
Hello Ryan,
Solr has a Filter class called solr.SuggestStopFilterFactory, which
basically works similar to solr.StopFilterFactory but with a slight
modification that if all of the words are present in stopwords.txt then it
won't remove the last one. 
I am not sure about wildcard search but if all of the query tokens are
stopwords.txt then at the very least it won't be returning the zero
results.(assuming that search results for the last word exists)  



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html