Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Loosen Search Query



    If I remember correctly, all input spaces are first being used as word separators and then trimmed, and after that several other characters are converted to spaces and then ...... ?

    Anyway, soundex might indeed help a bit (if the only language is English). I would certainly not call it a winner though. It's easy to beat the soundex results by some simple string replacements in PHP (even if the language is English), but for obvious reasons a php script can not be a real winner either....

  2. #12
    Join Date
    Sep 2007
    Location
    Dublin, Ireland
    Posts
    1,288
    Plugin Contributions
    8

    Default Re: Loosen Search Query

    I've also checked RLIKE (REXEXP) and MATCH() AGAINST () but they are not going to do what you are looking for. My ideas would be:

    1: str_replace the space character into '%'s and then tacking futher '%' each end of a TRIMed search and use this as the search in the MySQL query.

    2: Explode the search into an array and then use a FOREACH to create a search of '`product_name` LIKE '%'.search_word.'%' and OR all the results together.

    However this won't get over someone searching for 'redbilletgrillenissan' matching to 'billet grille'. But then I don't think it should- someone putting that much info into a search criteria is obviously trying to narrow down the search and probably won't be happy if the search returns every occurance of 'grille' it finds.
    Andrew

    Andrew Moore
    Omnicia Agile Development
    www.omnicia.com

  3. #13
    Join Date
    Sep 2007
    Location
    Dublin, Ireland
    Posts
    1,288
    Plugin Contributions
    8

    Default Re: Loosen Search Query

    The more I think about this the more I get the feeling that just setting Admin->My Store->Default Search Operator to 'OR' would probably be the best solution...
    Andrew

    Andrew Moore
    Omnicia Agile Development
    www.omnicia.com

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Search - including or ignoring "and" as first keyword in search query
    By nikerymis in forum General Questions
    Replies: 0
    Last Post: 27 Jan 2014, 08:44 PM
  2. Replies: 1
    Last Post: 25 Jan 2011, 02:05 PM
  3. Customize admin customer search query: search alt emails, too?
    By Matt008 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 15 Apr 2010, 01:10 AM
  4. Maintaining the user's search query in the advanced search box?
    By arniesbarmyarmy in forum General Questions
    Replies: 0
    Last Post: 26 Feb 2010, 01:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg