The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Better Search
[resolved] Plugin cannot handle hyphens and long words (6 posts)

  1. Michael Martinez
    Posted 2 years ago #

    Using version 1.3.1 of the plugin, I see that users are unable to find any results for "ONE-WORD" and "REALLYLONGWORD".

    If I remove the hyphen I can find results. When I search the site through Google using the hyphen Google is able to provide results. I realize Google has a lot more resources than a plugin developer but my point is that there IS content that relevant to a hyphenated keyword.

    The long word puzzles me. There is plenty of use of it on the site. It's only 12 letters long.

    I rebuilt the database and saw no improvement in results.

    If I search on the word stem I get similar results to what I would expect to find.

    Changing weights on title and copy had no effect.

    This appears to be a limitation of the plugin.


  2. Ajay
    Plugin Author

    Posted 2 years ago #

    Does it work if you turn on BOOLEAN mode in the Plugin settings page?

  3. Michael Martinez
    Posted 2 years ago #

    Apparently it does work with that setting active. Can you quickly explain what I'm giving up by leaving that setting active?

  4. Ajay
    Plugin Author

    Posted 2 years ago #

    The setting active will disable the contextual search feature and instead go for a simple word search feature which is weighted by how many terms are actually found.

    The contextual (fulltext) feature doesn't work in these cases as per the mySQL manual:

    Some words are ignored in full-text searches:

    Any word that is too short is ignored. The default minimum length of words that are found by full-text searches is four characters.

    Words in the stopword list are ignored. A stopword is a word such as “the” or “some” that is so common that it is considered to have zero semantic value. There is a built-in stopword list, but it can be overwritten by a user-defined list.

    The search result is empty because the word “MySQL” is present in at least 50% of the rows. As such, it is effectively treated as a stopword. For large data sets, this is the most desirable behavior: A natural language query should not return every second row from a 1GB table. For small data sets, it may be less desirable.

  5. Michael Martinez
    Posted 2 years ago #

    Okay. I'll have to think about this. Thank you.

  6. Ajay
    Plugin Author

    Posted 2 years ago #

    Your welcome.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic