0

I want to ask a question to find an algorithm. This specific question feels like a UX question to me, but I can also see the counter argument to that. Is this the correct site to ask for a search algorithm to best meet the needs of my users?

Here is the question I want to ask:

I have hundreds of items for the user to search through. I am trying to find the best search algorithm. I am currently using the Levenshtein Distance algorithm, but it does not suit my needs for the following reason.

Things user can search for: "Pool", "Pool Table", "Table"

When the user types in "Pool", I want the results to come back with both "Pool" and "Pool Table". But with the Levenshtein Distance algorithm, I can only return "Pool".

One solution is for me to run the algorithm on each word, and find my results like that. But I don't know if there is a better way, and I do not want to reinvent the wheel.

What is the best search algorithm for a user to search a database of strings that meets my above criteria?

2 Answers 2

2

No, it's not suited to the site. Because you've already solved the User Experience part of the problem:

When the user types in "Pool", I want the results to come back with both "Pool" and "Pool Table".

What you're not looking for is implementation advice on how to create this user experience.

1

There are many similar questions on StackOverflow, so I believe that is a good place to post it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .