Altering the query if query contains all stopwods

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Altering the query if query contains all stopwods

Ryan Yacyshyn
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
Reply | Threaded
Open this post in threaded view
|

Re: Altering the query if query contains all stopwods

tapan1707
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
Reply | Threaded
Open this post in threaded view
|

Re: Altering the query if query contains all stopwods

Rick Leir-2
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Altering the query if query contains all stopwods

Ryan Yacyshyn
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 <[hidden email]> 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 <[hidden email]> 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