473,569 Members | 2,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fulltext searches question

------=_NextPart_000_ 0000_01C34DF5.B 670D500
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I am running MySQL 4.0.12 on Windows XP. I am trying to create a library
database and have a table named "cardCatalo g" in the "library" database.
The cardCatalog has the following fields: callNumber (varchar(60)), title
(varchar(255)), author (varchar(255)), category (varchar(100)), location
(varchar(100)), copyrightDate(s mallInt(4) unsigned), numberOfPages
(smallInt(4) unsigned), and quantityAvailab le (smallInt(3) unsigned). I
have the following indexes on the table: Primary Key (callNumber), Fulltext
(title), Fulltext (author), and Fulltext (title, category). The Fulltext
(title,category ) is the index I seem to be having problems with. I have one
entry in the database with the category being "Computer programming,
programs, data". I try to execute the following query SELECT category,
title, author, callNumber, copyrightDate, location, numberOfPages,
quantityAvailab le FROM cardCatalog WHERE MATCH(title, category)
AGAINST("Comput er"); and it returns an empty set. It should return the
entry, but it does not. I cannot seem to figure out what I am doing wrong.
Could you please help me, any help would be very much appreciated.

------=_NextPart_000_ 0000_01C34DF5.B 670D500--

Jul 19 '05 #1
2 1776
This is because all words present in more than 50% of your records are
ignored.

In your case, you have only one record, so Computer is present in an least
50%.

Add at least 3 records to see if it works.

Vincent
""Wesley Hobbie"" <ws*****@yahoo. com> wrote in message
news:bf******** ***@FreeBSD.csi e.NCTU.edu.tw.. .
------=_NextPart_000_ 0000_01C34DF5.B 670D500
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I am running MySQL 4.0.12 on Windows XP. I am trying to create a library
database and have a table named "cardCatalo g" in the "library" database.
The cardCatalog has the following fields: callNumber (varchar(60)), title
(varchar(255)), author (varchar(255)), category (varchar(100)), location
(varchar(100)), copyrightDate(s mallInt(4) unsigned), numberOfPages
(smallInt(4) unsigned), and quantityAvailab le (smallInt(3) unsigned). I
have the following indexes on the table: Primary Key (callNumber), Fulltext (title), Fulltext (author), and Fulltext (title, category). The Fulltext
(title,category ) is the index I seem to be having problems with. I have one entry in the database with the category being "Computer programming,
programs, data". I try to execute the following query SELECT category,
title, author, callNumber, copyrightDate, location, numberOfPages,
quantityAvailab le FROM cardCatalog WHERE MATCH(title, category)
AGAINST("Comput er"); and it returns an empty set. It should return the
entry, but it does not. I cannot seem to figure out what I am doing wrong. Could you please help me, any help would be very much appreciated.

------=_NextPart_000_ 0000_01C34DF5.B 670D500--

Jul 19 '05 #2
This is because all words present in more than 50% of your records are
ignored.

In your case, you have only one record, so Computer is present in an least
50%.

Add at least 3 records to see if it works.

Vincent
""Wesley Hobbie"" <ws*****@yahoo. com> wrote in message
news:bf******** ***@FreeBSD.csi e.NCTU.edu.tw.. .
------=_NextPart_000_ 0000_01C34DF5.B 670D500
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I am running MySQL 4.0.12 on Windows XP. I am trying to create a library
database and have a table named "cardCatalo g" in the "library" database.
The cardCatalog has the following fields: callNumber (varchar(60)), title
(varchar(255)), author (varchar(255)), category (varchar(100)), location
(varchar(100)), copyrightDate(s mallInt(4) unsigned), numberOfPages
(smallInt(4) unsigned), and quantityAvailab le (smallInt(3) unsigned). I
have the following indexes on the table: Primary Key (callNumber), Fulltext (title), Fulltext (author), and Fulltext (title, category). The Fulltext
(title,category ) is the index I seem to be having problems with. I have one entry in the database with the category being "Computer programming,
programs, data". I try to execute the following query SELECT category,
title, author, callNumber, copyrightDate, location, numberOfPages,
quantityAvailab le FROM cardCatalog WHERE MATCH(title, category)
AGAINST("Comput er"); and it returns an empty set. It should return the
entry, but it does not. I cannot seem to figure out what I am doing wrong. Could you please help me, any help would be very much appreciated.

------=_NextPart_000_ 0000_01C34DF5.B 670D500--

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3998
by: Phil Powell | last post by:
Relevancy scores are normally defined by a MySQL query on a table that has a fulltext index. The rules for relevancy scoring will exclude certain words due to their being too short (minimum default is 4 letters). This is the Fed. Everything is a TLA (three-letter acronym). Therefore, since I'm building a PORTABLE web application,...
0
5757
by: Phil Powell | last post by:
The table already has a fulltext index and from there I can use the MySQL fulltext search query to get results as well as the relevancy score. The problem I have is that MySQL has a default setting whereby the minimum amount of characters is 4 for a search. Being that we're government and full of TLA (three-letter acronyms), that is not...
0
510
by: Wesley Hobbie | last post by:
------=_NextPart_000_0000_01C34DF5.B670D500 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I am running MySQL 4.0.12 on Windows XP. I am trying to create a library database and have a table named "cardCatalog" in the "library" database. The cardCatalog has the following fields: callNumber (varchar(60)),...
0
1751
by: Ralph Guzman | last post by:
I have to do a catalog search through multiple tables and columns for product model number, description, and name. I realize that doing pattern matching with multiple LIKE statements is slow so I found that FULLTEXT searches is a better alternative. I have added a FULLTEXT index to the tables I'm searching, but I get an unkown error when I...
0
1457
by: Henry Hank | last post by:
Environment: I'm setting up a database server on a Dell Poweredge 2650, dual 1.8GHZ pentium with 1GB of memory and RAID5 drives. I've installed RedHat 9, and updated the kernel to 2.4.20-19.9smp. I've installed the RPM binary distribution of MySQL 4.0.14 right from the MySQL website. The only thing I have done is disable InnoDb in my my.cnf...
0
1286
by: Matt W | last post by:
Hi all, I'm planning to use MySQL's full-text search for my forum system (possibly 5+ million posts). I've been playing with it a lot lately to see the performance and functionality and have some suggestions/questions. First, since a few of you may be wanting to know, here is a thread where I was doing some speed/optimization tests and...
1
1510
by: Matthias HALDIMANN | last post by:
Using CONTAINS, we can search for "never*" and we will find "nevertheless". However, I would like to do the inverse: "*less" should also find "nevertheless". Strangely, I can't find that in the doc and it does not seem to work. Am I getting something wrong? Or is this really not possible? Thanks a lot for your hints, Matthias Haldimann
1
6157
by: leegold | last post by:
Given the SQL shouldn't the records be sorting by score ie. relevance? I thought if "WHERE MATCH" is used it will sort that way. Thanks mysql> SELECT `page`.`title` , MATCH ( `title` , `descrip` ) AGAINST ( '+code+nasdac' IN BOOLEAN MODE ) AS SCORE FROM `page` WHERE MATCH ( `title` , `descrip` ) AGAINST ( '+code+nasdac' IN BOOLEAN MODE );...
0
2540
by: pcosway | last post by:
(originally posted in database.myodbc by mistake) I'm trying to speed up a fulltext search (MySQL 5.0.21, table has 670,000 records, about 900MBytes, machine has 1GB memory). Fulltext search speed is quite variable -- sometimes really fast, sometimes quite slow, so I'm trying to identify ways to make it more consistent.
2
2920
by: John Kotuby | last post by:
Hi all, Maybe this belongs in the Full Text group but I am writing an ASP.NET application with a SQL Server 2005 backend, so I am posing the question here. I have been using fulltext search on a text field for a while because originally the field was only being updated nightly and I could repopulate/rebuild the index nightly. Now I will...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.