MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 2nd, 2008, 06:26 PM
xbl1 xbl1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Posts: 221 xbl1 User rank is Sergeant (500 - 2000 Reputation Level)xbl1 User rank is Sergeant (500 - 2000 Reputation Level)xbl1 User rank is Sergeant (500 - 2000 Reputation Level)xbl1 User rank is Sergeant (500 - 2000 Reputation Level)xbl1 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 16 h 23 m 33 sec
Reputation Power: 10
Fulltext search

Hi:
i am trying to run a fulltext query, but it always display nothing, could you help, please.

my query as following:

PHP Code:
 select from Thread where Match(Subject,ContentAgainst("the best casino");


Table

create table Thread
(Id smallint auto_increment,
                    
Subject varchar(50),
                    
Content varchar(1000),
                    
CateId  smallint,
                    
SubCateId smallint,
                    
DisplayName varchar(30),
                    
link varchar(300),
                    
postTime TIMESTAMP Default CURRENT_TIMESTAMP,
                    
FULLTEXT(Subject,Content),
                    
primary key(Id),
                    
Foreign Key(CateIdReferences Category(CateId),
                    
Foreign Key(SubCateIdReferences SubCategory(SubCateId))

insert into Thread (SubjectContentCateIdSubCateIdDisplayNamelinkvalues 
("the best casino""Best Casino & Best Online Casino 2006-2007 - Allowing Players ...
Not all casinos introduce the best casino game. The importance of game is highest level if you think about the players enjoyment of the game, ..."
"1""2""bill""www.nnnnn.com")

-> (
"fulltext mysql""MySQL :: MySQL 5.0 Reference Manual :: 11.8 Full-Text Search Functions
The Wikipedia encyclopedia uses MySQL boolean full text search and MySQL 4.0.20. You can assess the speed yourselves. About 350000 articles/ rows in the ..."
"4""5""hill""www.kkkk.com"

Reply With Quote
  #2  
Old May 2nd, 2008, 07:21 PM
Guelphdad's Avatar
Guelphdad Guelphdad is offline
defragging hard drive
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Guelph Canada
Posts: 7,006 Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level)Guelphdad User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 2 Months 1 Week 5 Days 3 h 8 m 27 sec
Reputation Power: 607
you have an insignificant number of test rows. If the search returns 50% of the rows then the search term is ignored. Add more test rows.

Reply With Quote
  #3  
Old May 2nd, 2008, 09:11 PM
xbl1 xbl1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Posts: 221 xbl1 User rank is Sergeant (500 - 2000 Reputation Level)xbl1 User rank is Sergeant (500 - 2000 Reputation Level)xbl1 User rank is Sergeant (500 - 2000 Reputation Level)xbl1 User rank is Sergeant (500 - 2000 Reputation Level)xbl1 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 16 h 23 m 33 sec
Reputation Power: 10
Quote:
Originally Posted by Guelphdad
you have an insignificant number of test rows. If the search returns 50% of the rows then the search term is ignored. Add more test rows.


yes, you are right. after i add more rows, it work.

but i got the problem for search the following term, it display nothing for it, Does it ignore some words?
Search term: the beautiful girl in the world

i have added about 5 rows relative with the search terms.

PHP Code:
 insert into Thread (SubjectContentCateIdSubCateIdDisplayNamelinkvalues 
("the beautiful girl in the world  """The Most Beautiful Girl in the World" is a song by Prince from his 1995 album The Gold Experience. It was his first release since changing his stage name .""11""21""bill""www.nnnnn.com")

->(
"The Most Beautiful Girl in the World  """The Most Beautiful Girl in the World" is a song by Prince from his 1995 album The Gold Experience. It was his first release since changing his stage name .""111""211""bill""www.nnnnn.com")
->...
->... 

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Fulltext search


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway