If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Full Text In Boolean Mode Not Working as expected

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-15-03, 11:52
DrSmartman DrSmartman is offline
Registered User
 
Join Date: Aug 2003
Location: Reston, VA
Posts: 59
Full Text In Boolean Mode Not Working as expected

Hi Everyone,

I am running MySQL 4.0.1 and am trying to get the IN BOOLEAN MODE feautre of the FULLTEXT search function to work properly. Below is a sample query:

SELECT RANKING,TITLE,EXCERPT,URL,MATCH(AUTHOR,TITLE,EXCER PT,ANNOT,KEYWORDS) AGAINST ('"hello world" +history +science museum method* -scientific' IN BOOLEAN MODE) AS SCORE FROM directory_new WHERE MATCH(AUTHOR,TITLE,EXCERPT,ANNOT,KEYWORDS) AGAINST ('"hello world" +history +science museum method* -scientific' IN BOOLEAN MODE) AND RANKING!='0' ORDER BY SCORE,RANKING DESC LIMIT 0,20;

I would expect this query to search the FULLTEXT indexed fields above indicated above as...

Exact Words/Phrase: "hello world"
Required Words: history, science
Optional Words: museum
Truncated Words: method
NOT These Words: scientific

Unfortunately, I have done some testing and found the following using a number of scenarios. First, the Exact Phrase ("hello world") does NOT work. Second, none of the options seem to take multiple arguments (+history +science). Third, combining these options (required, NOT, etc..) does not produce the desired results.

I guess my question is does the query look correct for what I am trying to do? All the fields are FULLTEXT indexes and I am running 4.0.1 which supports IN BOOLEAN MODE. What could be wrong? What am I missing? Any ideas? I manually checked the search records to verify, but to no avail.

Many thanks for your insight!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On