Dirty Butter Posted June 22, 2015 Author Share Posted June 22, 2015 Another question for search based on your RLIKE method outlined above:Is there any way to allow search to "skip" a provided list of stop words, such as a, all, and, with, for .... as appropriate to searches I see people using on our site. We seem to meet the needs of a customer base who mostly have no idea how to search logically. I have seen search terms such as "all pink teddy bears with flowers" - which will not find anything!!! Link to comment Share on other sites More sharing options...
bobdonkey Posted June 24, 2015 Share Posted June 24, 2015 I see there is a fix in 6.0.6 for the search, does this fix the issue with products with a hyphen? Issue #599: https://github.com/cubecart/v6/issues/599Also, be aware that 6.0.6 update will replace the catalogue.class.php file so you will lose any changes you made with bsmithers fix. Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 24, 2015 Author Share Posted June 24, 2015 I still have all my old edits - I always upgrade with BeyondCompare. But thanks for the heads up that search was changed in 6.0.6. I'll give a stock search a try. Link to comment Share on other sites More sharing options...
bobdonkey Posted June 25, 2015 Share Posted June 25, 2015 OK this fixed my issues, I am on stock 6.0.6 and searching for products codes with hyphens in now works! I am very happy, one more issue off my list. I don't know about the problems with word ordering however... Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 25, 2015 Author Share Posted June 25, 2015 Glad for you the stock search works - have doubts it would for me, but haven't had time to fiddle with it yet. Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 20, 2016 Author Share Posted September 20, 2016 6.1.0SEARCHcatalogue.class.php I'm revisiting this thread in a preemptive strike concerning GitHub download of 6.1.0 as it is as of today. I've tested my edited version of files, but with the stock 6.1.0 catalogue.class.php. It does not provide a narrowed down search results list. So, I've attached my ATTEMPT to merge the refined search code you provided in this thread with the stock 6.1.0 catalogue.class.php. I'm not sure about the last line of code and it may be that @bsmither or others will see a better way to improve the 6.1.0 stock file. Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 21, 2016 Author Share Posted September 21, 2016 I have concluded that the last line of code in the 6.0.12 catalogue.class.php keeps the Sort from working properly with 6.1.0 attempt with Bsmither's search code. I had not been sure whether that was needed to get Bsmither's search code to work or not. So $searchArray[] = $word; is NOT to be used with this search code in 6.1.0 as far as I can tell. Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 16, 2016 Author Share Posted November 16, 2016 On 6/22/2015 at 2:47 PM, Dirty Butter said: Is there any way to allow search to "skip" a provided list of stop words, such as a, all, and, with, for .... as appropriate to searches I see people using on our site. We seem to meet the needs of a customer base who mostly have no idea how to search logically. I have seen search terms such as "all pink teddy bears with flowers" - which will not find anything!!! This issue still has not been addressed, as far as I can tell in stock or edited search code. Another example from today of a Customer Search that produced NO results, when it would have without the stop word "with" being there: .../search.html?_a=category&search%5Bkeywords%5D=pink+puffalump+bear+with+white+dress Is there any way to create a database table of stop words appropriate for a particular store's inventory and then have the Search ignore those words? I found these directions that seemed to be what I would want: http://dev.mysql.com/doc/refman/5.7/en/fulltext-stopwords.html http://99webtools.com/blog/list-of-english-stop-words/ Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 3, 2018 Author Share Posted July 3, 2018 Bsmither has provided an updated version of the code he helped me with here. The code in this post will not work correctly with php 7.2. So he created code that will work on CC 6.1.15 as well as CC 6.2.1 sites on php 7.2. https://forums.cubecart.com/topic/54048-php-725/ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.