Well, when not splitting on whitespace you can the CharFilter for regex
replacements [1] to clear the entire search string if anywhere in the string a
banned word is found:
.*(cigarette|tobacco).*
[1]
I can’t think of an easy way to do this in Solr.
Do a bunch of string searches on the query on the client side. If any of them
match,
make a “no hits” result page.
wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/ (my blog)
> On Sep 30, 2020, at 11:56 PM, Derek
Yes, the requirements (for now) is not to return any results. I think
they may change the requirements,pending their return from the holidays.
If so, then check for those words in the query before sending it to Solr.
That is what I think so too.
Thinking further, using stopwords for this,
Hi Alex
The business requirement (for now) is not to return any result when the
search keywords are cigarette related. The business user team will
provide the list of the cigarette related keywords.
Will digest, explore and research on your suggestions. Thank you.
On 30/9/2020 10:56 am,
I’m not clear on the requirements. It sounds like the query “cigar” or “cuban
cigar”
should return zero results. Is that right?
If so, then check for those words in the query before sending it to Solr.
But the stopwords approach seems like the requirement is different. Could you
give
some
You may also want to look at something like: https://docs.querqy.org/index.html
ApacheCon had (is having..) a presentation on it that seemed quite
relevant to your needs. The videos should be live in a week or so.
Regards,
Alex.
On Tue, 29 Sep 2020 at 22:56, Alexandre Rafalovitch wrote:
>
>
I am not sure why you think stop words are your first choice. Maybe I
misunderstand the question. I read it as that you need to exclude
completely a set of documents that include specific keywords when
called from specific module.
If I wanted to differentiate the searches from specific module, I
Hi
I have read in the mailings list that we should try to avoid using stop
words.
I have a use case where I would like to know if there is other
alternative solutions beside using stop words.
There is business requirement to return zero result when the search is
cigarette related words