HydraulicJack
02-21-2007, 06:07 AM
Of the vB installs I've seen, it appears that it's only possible to search by a single word (e.g. "foo") or for posts containing a group of non-contiguous (or contiguous buried in a mountain of posts where the words are not contiguous (e.g., "foo, bar, sna, fu)), but not by a phrase, i.e. to return a list of posts containing only the words when in a contiguous phrase e.g., "foo bar sna fu".
Seems like since vB is based on MySQL that it's doable.
Does anyone know of a mod for vB that offers this keyphrase search option, and perhaps a link to it?
The following is what I'm talking about:
imho THIS MySQL query hack would make the info in a vB database WAAAAY more accessible than single-word poking around...
The following is from:
http://www.samspublishing.com/articles/article.asp?p=377068&seqNum=13&rl=1
A phrase search can be performed to require all words to be present in a particular order. Enclose the phrase within double quotes, and include punctuation and whitespace that is present in the phrase you want to match. In other words, you must specify the exact phrase:
mysql> SELECT * FROM apothegm
-> WHERE MATCH(attribution, phrase)
-> AGAINST('"bell book and candle"' IN BOOLEAN MODE);
Empty set (0.00 sec)
mysql> SELECT * FROM apothegm
-> WHERE MATCH(attribution, phrase)
-> AGAINST('"bell, book, and candle"' IN BOOLEAN MODE);
+---------------------+------------------------+
| attribution | phrase |
+---------------------+------------------------+
| Miguel de Cervantes | Bell, book, and candle |
+---------------------+------------------------+
:up: :up: :up:
Seems like since vB is based on MySQL that it's doable.
Does anyone know of a mod for vB that offers this keyphrase search option, and perhaps a link to it?
The following is what I'm talking about:
imho THIS MySQL query hack would make the info in a vB database WAAAAY more accessible than single-word poking around...
The following is from:
http://www.samspublishing.com/articles/article.asp?p=377068&seqNum=13&rl=1
A phrase search can be performed to require all words to be present in a particular order. Enclose the phrase within double quotes, and include punctuation and whitespace that is present in the phrase you want to match. In other words, you must specify the exact phrase:
mysql> SELECT * FROM apothegm
-> WHERE MATCH(attribution, phrase)
-> AGAINST('"bell book and candle"' IN BOOLEAN MODE);
Empty set (0.00 sec)
mysql> SELECT * FROM apothegm
-> WHERE MATCH(attribution, phrase)
-> AGAINST('"bell, book, and candle"' IN BOOLEAN MODE);
+---------------------+------------------------+
| attribution | phrase |
+---------------------+------------------------+
| Miguel de Cervantes | Bell, book, and candle |
+---------------------+------------------------+
:up: :up: :up: