1

I need to create a powerful search page for my website, I am using php & mysql.

I want to

  • get results with partial match. Eg, if I have stackoverflow in db but i have searched stacke so that should show up in the results.

    I know about LIKE. I want to build a search like google which does take similar type words and searches that too.

  • get results by matching every word in the search string separately.

4
  • Do you want to use the full text search indexes of MySQL or an external search provider like Elastic Search or Solr? Commented Apr 26, 2013 at 15:12
  • there is no part stacke in stackoverflow Commented Apr 26, 2013 at 15:14
  • @tadman - thanks for understanding the requirement buddy! I want to build a search like google which does take similar type words and searches that too. Commented Apr 26, 2013 at 20:13
  • You'll probably need to look at a search add-on for MySQL. The built in tools are decent enough if you're willing to put up with their limitations. The add-ons vary in capability, from better to fantastic. Commented Apr 26, 2013 at 20:40

1 Answer 1

5

I don't know about "stacke" since that's not a substring of "stackoverflow". Maybe you meant "stacko"? In that case your query would be like

SELECT stuff FROM table WHERE field LIKE "stacko%";
Sign up to request clarification or add additional context in comments.

1 Comment

I know about LIKE. Please read the question again, i have modified it.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.