473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 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 1755
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
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...
0
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...
0
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...
0
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...
0
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....
0
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...
1
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...
1
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`...
0
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...
2
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.