0

I'm creating a simple search from image tags and corresponding text from a database.

It has come up that a user has words like cathedral and cathedrals and when visitors search for cathedrals they don't see the cathedral results.

Is it a good idea to try to replace English plural words with single variant in the search query?

Without a dictionary (in some cases even with it) this would change words like Moses to Mos and would match mosquito.

Or bees would be searched as be and match rebel...

3
  • The be matching rebel shouldn't be a big problem as long as you rank-order the results to first show exact matches of the full word bees then full matches of the full word bee followed by matches (if you're doing this without a dictionary) of the full word be, then potentially matches of bees and bee and be as part of a word. (Whether you should match partial words at all is a separate question; I don't think it's a good idea. Better to match full words only and suggest alternative searches within a certain Levenshtein distance.) Commented Aug 21, 2014 at 16:37
  • 1
    You may want to edit your question to make your constraints clearer. Why would you be doing this without a dictionary? Is embedding a professional search an option? Commented Aug 21, 2014 at 16:43
  • And how about verb tenses? Searching / searched / search / searches. A more common approach is stemming. Many free stemming algorithms available. I don't think be should match rebel. en.wikipedia.org/wiki/Stemming
    – paparazzo
    Commented Aug 21, 2014 at 20:17

2 Answers 2

0

Generally, don't make assumptions on a user's intentions when performing a search (or anything else). If a user is looking for multiple 'cats' don't assume that a single 'cat' is good enough to quench the user's lust for feline shenanigans.

There are also a great deal of plurals that would be very difficult for you to adjust to - 'goose' vs. 'geese', for example. If you match some plurals but not others, you will begin to create confusion.

Define a straight forward search logic and stick to it. One suggestion might be:

  1. Exact match
  2. Partial match, from start ('cathedral' matches 'cathedrals'; 'be' matches 'bee', not 'rebels')
  3. Partial match, internal to string ('be' matches 'rebel')

Rank ordering the results based on the above would allow the user to learn the search pattern. Mixing results would make that more difficult. While the above still suffers from 'cathedrals' not matching 'cathedral', the user may likely adjust their search on their own.

If you are still want to guess on plurals, I'd suggest including a "do you want to try" section -- similar to Google's "did you mean" string when you misspell something in your search. This gives the user the ability to quickly just to plurals (or singulars) without cluttering results that may be exactly what they wanted.

1
  • Just what I needed. Yeah I agree that I shouldn't juggle plurals with singulars. Putting results in order of relevance like your 1 2 3 is achievable and a good idea, thanks. Commented Aug 23, 2014 at 11:16
0

Don't change the word in the input field, because then there will be a cognitive disconnect.

What you should do, however, is show the results below and list them in terms of relevance like so:

mockup

download bmml source – Wireframes created with Balsamiq Mockups

Or, what you could do is also have a smart search where it will suggest words. That way you can minimize "wrong searches" like so:

mockup

download bmml source

You can also just do both. They both can work, just make sure to clearly show what you have what they searched. Even a "Did you mean" field could help. Just look at google and try to imitate what they do because they do it right.

2
  • While I like your answer a lot, it doesn't apply to my case. I didn't mean to change the word while the user is typing to the input field. Suggest search is great but it's not in the scope of my work to have implemented. Commented Aug 23, 2014 at 11:18
  • No problem at all man! Just happy you found the right answer :)
    – UXerUIer
    Commented Aug 24, 2014 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.