Ranking results based on most common phrases - How?
Hi all,
I've been trying to come up with a solution to the following problem without luck. Please let me know if this is possible to do with MySQL.
I would like to find the most commonly occurring words (or phrases) in a field in my database table. For example, my structure might look like this...
CREATE TABLE `test` (
`question` VARCHAR NOT NULL DEFAULT '',
FULLTEXT `Index_2`(`question`)
)
My data might look like this...
Row Question
------------------
1 This is a sample question.
2 This is another question.
3 Red fox ate the gray rabbit
4 Question four
The results I'm looking for would be...
Occurrence Keyword
------------------
3 question
2 is
2 This
etc.
The results would be ranked based on the number of occurrences of each word in the database. Ideally, I'd like to do this with phrases, not just words too. (I'm not sure how to define phrases, except to say that they may be multi word combinations)
I'm assuming I'd have to use full-text search for this, but I couldn't find a way to do it. Is there a way to get this done?
Any help, pointers, hints would be much appreciated!
TIA!
Balazs
Subject
Views
Written By
Posted
Ranking results based on most common phrases - How?
6551
August 12, 2008 10:56AM
3419
August 19, 2008 06:50PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.