Announcement

Collapse
No announcement yet.

Full Text Search / Stop Words Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Full Text Search / Stop Words Question

    My client asked me to enable FTS for the Product Name and Description. I did so, and now they're asking me why when they search for "cut-off" they get no results even though they have lots of products with this in the name and/or description.

    I researched the FTS documentation and the MySQL stop words and my best guess here is that their MySQL database is using the MyISAM stop word list which includes the word 'off'. Meaning, that portion of their search won't be used for searching and the rest of their search is just 'cut-' which I think returns no results because the hyphen is being ignored and so they have less than 3 characters which Miva won't execute a search for.

    Is my understanding correct? Can I access their MySQL database and update the stop words? Other possible solutions?

    #2
    You are on the right path as MySQL sets the default word length for full text searches to 4 characters.

    A few suggested solutions:

    1. Use suggested search to offer 'cutoff' in a list of non-hyphenated word.
    2. Use javascript to scrub the hyphen from the seach phrase onSubmit.
    3. Add any non-hyphenated keywords to your Product > SEO >Keywords or Product > Custom Fields and adjust weight in Search Settings or Fields.



    http://www.alphabetsigns.com/

    Comment


      #3
      I just thought that you may be able to add a pattern filter to the text input so it only allows alphanumeric characters and spaces. No hyphens.

      Example:

      Code:
      
      <input type="search" name="search" required pattern="[a-zA-Z0-9\s]+" />


      http://www.alphabetsigns.com/

      Comment

      Working...
      X