#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2014
    Posts
    2
    Rep Power
    0

    Plural/Singular, Order and Case Insensitive Database Search


    I want to implement a database search that is insensitive to plural/singular, order and case of the words used in an input string. I am using MySQL database. For example if the input string is:

    "woman looking for a desktop, Printers and laptopS"

    the search must return all rows that contain any of the following words in any order and whether they contain upper or lower case letters:
    woman women desktop desktops printer printers laptop laptops

    How do I do this?
    MySQL fulltext search cannot handle the plural/singular and regular expressions in MySQL are sensitive to the order of the words.
  2. #2
  3. Headless Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,933
    Rep Power
    9647
    If you want something more complicated than FULLTEXT (or don't want MyISAM) then you should consider dedicated search services, like Solr/Lucene or Sphinx.

    Comments on this post

    • Laurent_R agrees
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2014
    Posts
    2
    Rep Power
    0
    Thanks Requinix. Sphinx seems to do the job well.

    Originally Posted by requinix
    If you want something more complicated than FULLTEXT (or don't want MyISAM) then you should consider dedicated search services, like Solr/Lucene or Sphinx.

IMN logo majestic logo threadwatch logo seochat tools logo