WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. sffandom
    Member
    Posted 11 months 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.

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

  2. Ajay
    Member
    Plugin Author

    Posted 11 months ago #

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

  3. sffandom
    Member
    Posted 11 months 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
    Member
    Plugin Author

    Posted 11 months 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. sffandom
    Member
    Posted 11 months ago #

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

  6. Ajay
    Member
    Plugin Author

    Posted 11 months ago #

    Your welcome.

Reply

You must log in to post.

About this Plugin

About this Topic