471,108 Members | 1,298 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

Fulltext searches question

------=_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)), title
(varchar(255)), author (varchar(255)), category (varchar(100)), location
(varchar(100)), copyrightDate(smallInt(4) unsigned), numberOfPages
(smallInt(4) unsigned), and quantityAvailable (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,
quantityAvailable FROM cardCatalog WHERE MATCH(title, category)
AGAINST("Computer"); 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.B670D500--

Jul 19 '05 #1
2 1686
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.csie.NCTU.edu.tw...
------=_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)), title
(varchar(255)), author (varchar(255)), category (varchar(100)), location
(varchar(100)), copyrightDate(smallInt(4) unsigned), numberOfPages
(smallInt(4) unsigned), and quantityAvailable (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,
quantityAvailable FROM cardCatalog WHERE MATCH(title, category)
AGAINST("Computer"); 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.B670D500--

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.csie.NCTU.edu.tw...
------=_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)), title
(varchar(255)), author (varchar(255)), category (varchar(100)), location
(varchar(100)), copyrightDate(smallInt(4) unsigned), numberOfPages
(smallInt(4) unsigned), and quantityAvailable (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,
quantityAvailable FROM cardCatalog WHERE MATCH(title, category)
AGAINST("Computer"); 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.B670D500--

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Phil Powell | last post: by
reply views Thread by Wesley Hobbie | last post: by
reply views Thread by Ralph Guzman | last post: by
reply views Thread by Henry Hank | last post: by
reply views Thread by Matt W | last post: by
1 post views Thread by Matthias HALDIMANN | last post: by
1 post views Thread by leegold | last post: by

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.