Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

search engine question


oscommerce_newbie

Recommended Posts

Posted

Is there a way to modify the search engine so that is someone searches a product in the "singular" , it's "plural" will also display?

 

So if someone types in "plants", but the products in the program are listed with only the word "plant", the ones with the word "plant" will also display?

 

Thanks in advance.

Posted
Is there a way to modify the search engine so that is someone searches a product in the "singular" , it's "plural" will also display?

 

So if someone types in "plants", but the products in the program are listed with only the word "plant", the ones with the word "plant" will also display?

 

Thanks in advance.

 

always strip your keywords of the last "ies" or last "s" if the preceding letter is not "i" or "s".

 

You can experiment with more of those manipulations depending on the keywords you expect if you will.

Treasurer MFC

Posted
always strip your keywords of the last "ies" or last "s" if the preceding letter is not "i" or "s".

 

You can experiment with more of those manipulations depending on the keywords you expect if you will.

 

 

 

 

I don't understand what you mean?

Posted
I don't understand what you mean?

 

what part about "always strip your keywords of the last "ies" or last "s" if the preceding letter is not "i" or "s"."

is not clear?

Treasurer MFC

Posted
what part about "always strip your keywords of the last "ies" or last "s" if the preceding letter is not "i" or "s"."

is not clear?

 

 

I thought search results were determined by the product descriptions.

If each product description HAS to BE a certain word or phrase, how much variability do I have?

What am I missing here?

 

Thanks

Posted
I thought search results were determined by the product descriptions.

If each product description HAS to BE a certain word or phrase, how much variability do I have?

What am I missing here?

 

Thanks

 

your website search or google/yahoo search results?

Treasurer MFC

Posted
your website search or google/yahoo search results?

 

 

I mean the default search app in oscommerce. Not any SEO stuff outside of the site directly.

 

To me it seems that if I add a product and the title or name of the product is "Yellow Plant Number 1122", if someone does a search under "plants", it doesn't show up. If someone does a search under "plant" or "yellow", or "1122" that particular product, "Yellow Plant Number 1122", does show up.

 

I am wondering how I can either modify the engine directly or the way in which I am adding products, so that if someone searches under a key word (s), that is either singular or plural, a product will display that is either singular or plural. WITHOUT, adding a product named "Yellow(s) Plant(s) Number(s) 1122(s)".

 

Thanks again.

Posted
I mean the default search app in oscommerce. Not any SEO stuff outside of the site directly.

 

To me it seems that if I add a product and the title or name of the product is "Yellow Plant Number 1122", if someone does a search under "plants", it doesn't show up. If someone does a search under "plant" or "yellow", or "1122" that particular product, "Yellow Plant Number 1122", does show up.

 

I am wondering how I can either modify the engine directly or the way in which I am adding products, so that if someone searches under a key word (s), that is either singular or plural, a product will display that is either singular or plural. WITHOUT, adding a product named "Yellow(s) Plant(s) Number(s) 1122(s)".

 

Thanks again.

 

search results are determined by both your text and keywords.

 

if your text contains "plants" and people search for "plant" they will find it but if your text contains "plant" and they search for "plants" they will not.

 

as I said, to eleviate that you need to remove any "plural" indictors from the keywords before the search is performed.

 

So if the keyword is "plants", strip the last "s" so the search will be on "plant".

"ties" becomes "tie", "shoes" becomes "shoe", "numbers" becomes "number", etc.

 

if they search on "berries", replace the "ies" with "y" before the search, etc.

"ferries" becomes "ferry", "bellies" becomes "belly".

 

(better have your highschool dictionary handy).

Treasurer MFC

Posted

you will require some php coding skills for that.

 

you will need to edit advanced_search_result.php

code will look something like:

 

$stringlength = strlen($keywords);
if(substr($keywords, $stringlength-1, $stringlength) == 's') $keywords = substr($keywords, 0, $stringlength-1);

 

but this does not cover any exceptions "jackass" becomes "jackas". So this is not valid, but does give a clue on how you could come to a solution. as said before, this will require some coding skills, and I am not willing to do this for you (would hate to have to go through all posible exceptions).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...