1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Enhanced Search Resolved Bugs' started by rebelde, Jun 1, 2015.

  1. rebelde

    rebelde Member

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

    A search for "and" gives me:
    1. The message:
    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​
  2. Fred.

    Fred. Well-Known Member

    Did you set the Search Minimum Word Length ?
  3. rebelde

    rebelde Member

    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.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    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?
  5. rebelde

    rebelde Member

    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.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    This site and mine have ES installed.

    How have you implemented that?
    Hence why I asked whether you have made any changes.

    We need steps to be able to reproduce it.
  7. rebelde

    rebelde Member

    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.
  8. Brogan

    Brogan XenForo Moderator Staff Member

  9. rebelde

    rebelde Member

    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.
  10. rebelde

    rebelde Member

    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​
    possibly show that message​

    I have a test server that I could let you into if you want to see it in action.
  11. Daniel Hood

    Daniel Hood Well-Known Member

    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.
  12. rebelde

    rebelde Member

    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.
  13. Daniel Hood

    Daniel Hood Well-Known Member

    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).
  14. rebelde

    rebelde Member

    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: Jun 5, 2015
  15. rebelde

    rebelde Member

    Forgive the double-post.

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

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

  16. Mike

    Mike XenForo Developer Staff Member

    I have now removed the default stopwords list so no error should display in this case.
    Xon likes this.

Share This Page