Page 1 of 1

Modifying Simple Search Logic

Posted: Thu Aug 04, 2011 3:50 pm
by euroluxantiques
I've read just about all the posts I could find on here, and it seems that I need the source code to modify the search logic. Is this correct? What I am trying to accomplish is that I notice in Google Analytics that many customers search "tables" or "sideboards," etc. on our site, and nothing will return because the title and descriptions in these items typically only contain the word in singular. Short of modifying all listings to include the plural, I would like to modify the Simple Search logic so that if a customer searches for "sidebaords" and no specific items actually match that, it would return the associated category. For SEO purposes, we typically have a wide-range of search terms in the category description field, and this would help the customer find what they were looking for if we could return a suggested category to them. Does anyone know how to modify Simple Search to search the category description field and return the category name (and icon/thumbnail) if the search matches? Thanks!

Re: Modifying Simple Search Logic

Posted: Fri Aug 05, 2011 6:57 am
by jmestep
Do you have full text search turned on? I think it searches description 7.0.6, but the full text search on 7.0.7 is even better. Without that you could try a few of things:
Change the simple search to pull using the Advanced Search method.
Add the keywords with no results to product keyword fields.
Put code on the page to substitute search terms with what brings results.

Re: Modifying Simple Search Logic

Posted: Fri Aug 05, 2011 9:11 am
by euroluxantiques
Where is the code? I don't see it in the regular cs files, so I'm thinking it's in the DLL. I don't have the source code option, but I can get it if need be. Thanks!

Re: Modifying Simple Search Logic

Posted: Sat Aug 06, 2011 9:30 am
by jmestep
It is in the SearchPage.ascx.cs and the advanced search is in AdvancedSearchPage.ascx.cs

Re: Modifying Simple Search Logic

Posted: Sat Aug 06, 2011 4:07 pm
by euroluxantiques
Thanks, Judy. I ended up taking a different approach, which I think will be better. I just added search keywords into our product database for all the variances I needed and used those to automatically populate ac_Products.SearchKeywords. I then installed Plugables module SearchAutoComplete in place of SimpleSearch and populated the table provided with the same SearchKeywords. Everything is updated dynamically, based on the products online at any one time, and it works awesome!