Announcement

Collapse
No announcement yet.

Plurals in Searching

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

    Plurals in Searching

    I noticed that Actinic search considers the plural form of a word as a different word. Searching for skeletons does not find skeleton.

    I used the noscript tag workaround to add the word to the description, but it should consider the words equivalent. People are very inconsistent when they enter search words.
    Bob Ladden

    #2
    You are right, this isn't really correct. But if you take a look on the web search engines (which are specialised in search not in e-commerce) you will find that even those are not considering the grammatic issues. There are at least two major reasons
    • Different languages use different rules. Therefore the implementation of a generic solution is almost impossible.
    • If you are thinking about plural this seems to be a simple task at the first blink but how do you know that the word is plural? Do you expect hits for all 'u' if the entered word is 'us'? As you can see this would require a proper dictionary which would be a performace hit. And we just considered the plurals. Probably the next request would be to find 'run' if the entered word is 'running', 'runs' or 'ran'.


    Regards,
    Zoltan
    Actinic Software
    www.actinic.co.uk

    Comment


      #3
      Since my site is in English I added this to search.pm just above the line
      # Combine any multiple-white-spaces into single space:

      $$psSearchString =~ s/es$//io;
      $$psSearchString =~ s/s$//io;
      $$psSearchString =~ s/es\b//io;
      $$psSearchString =~ s/s\b//io;

      I turned on logging to see if was working OK. It is. Since Actinic matches the beginning of words, it is good.

      I know the Perl purists could do it all in one line.
      Bob Ladden

      Comment


        #4
        This is great and works a treat as far as I can see. It means I can finally delete the following text from my search page:

        "To search for a product enter search words, price range, or both below. The results will be displayed with links to the specified product. Tip: Search for words as they are likely to be displayed in the site. For example search for dragon instead of dragons."

        Thanks rmladden

        Comment

        Working...
        X