WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Plugin cannot handle hyphens and long words

[Resolved] Plugin cannot handle hyphens and long words

  • 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.

    http://wordpress.org/plugins/better-search/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ajay
    Participant

    @ajay

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

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

    Plugin Author Ajay
    Participant

    @ajay

    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.

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

    Plugin Author Ajay
    Participant

    @ajay

    Your welcome.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Plugin cannot handle hyphens and long words’ is closed to new replies.