1
votes

I want to make sure I do this right from the beginning and I couldn't find a good answer for this so I figured I'd ask.

What I'll be doing is the following.

Taking a sentence such as: The quick brown fox jumped over the lazy dog" and searching for matches in multiple tables using fulltext.

One table will be keywords. All single words. A second table will be phrases.

The keyword part is easy, I explode(), I'm using php, the sentence and then search for matches in the keyword table.

The phrases is where I'm not sure. Can I search the phrases table against the whole sentence string and it will find any matches. Like "lazy dog" or "brown fox" or does it try to find the whole sentence?

Hopefully this makes sense.

Thank you Bruce

1

1 Answers

2
votes

You might want to look into a fulltext engine like Sphinx or Lucene. mySQL's fulltext search is quite slow and cumbersome. I really like Sphinx because you can compile a mySQL engine plugin to interface with your fulltext engine.