Fixed search "keywords too short" message appears even when search succeeds

rebelde

Active member
My board is probably set up differently from most others, but:

A search for "and" gives me:
1. The message:
The search could not be completed because the search keywords were too short, too long, or too common.
2. Threads with "and" in the title.​

What I was expecting:
The message should not show when we are not using the stop words list.
My setup:
Elastic Search (XenForo Enhanced Search 1.2.2)
XF 1.4.5​
 
I did also change the length to 1, but the message is still there. That value doesn't seem to do anything when using Elastic Search.
 
That option isn't used with ES.

I can't actually reproduce the error here or on any of my installations.

Have you made any changes at all?
 
Any changes at all? I disabled a search add-on that we created (to show soft-deleted threads to moderators), and the problem was still there.

Brogan, I think you could only replicate this if you have an installation that 1. Has Elasticsearch and 2. Doesn't use the stop word list.
In other words, the search for "and" must give results to really test this.

Thanks for your help.
 
I can't find where ES has a stop-word list. If it normally does, and it includes the word "and" then we must have disabled it. I'm not sure where. I don't see it in the ES config.
 
Thanks for the links. I can't figure out how, but we must have disabled the stopwords in Elasticsearch. I don't see anything in elasticsearch.yml or the XenES code. Sorry. I might find it later.
 
Whatever the case, when there are search results for whatever reason, I think the "search cannot be completed" message shouldn't show.

if (there are results)
show them​
else
possibly show that message​


I have a test server that I could let you into if you want to see it in action.
 
This isn't a "whatever the case" situation though. You are operating customized code which is at fault. Currently, on any default installation, when you get the "search cannot be completed" message you do not see results. So, this is a conversation you should be having with whatever developer made the change that is causing the behavior you dislike.
 
I just wanted to report a bug, not start a discussion.

An English stop-word list can cause problems for multilingual forums. ("but" and "on" have different meanings in French, as does "as" in Spanish.) Disabling it is what non-English forums should be doing.
 
I understand. The problem is that it's not a bug because it doesn't exist in the core software. It may be a bug on your site but xf can't do anything about it because you changed the core (Or had someone else do it).

This would be more fit for a suggestion (suggesting a way to remove the stop word list), in the development board (asking for help removing it or fixing it one that it's already partially done), in the questions section (asking how to do it before you already did it on your own).
 
This is really weird. Community members discouraging bug reports.

Let's let XF decide what they think is a bug and what isn't, or what they think is worth changing and what isn't.
 
Last edited:
Forgive the double-post.

It looks like those stopwords are no longer used by ElasticSearch by default. Another source with the ES code.

Also:
Strictly speaking, any site will benefit from ES by getting rid of MySQL's limitations and stopword list. (Obviously you can change these, but then you'll start running into performance issues sooner.)

So, maybe the answer is to not check the stopword list if the site is using ES and the Standard analyzer.

Cheers
 
Top Bottom