I have a FULLTEXT index.
when i query it for a specific item, i get different results in
phpMyAdmin, vs a PHP search app I'm developing.
In the PHP search app, the match I expect isn't returned (in fact
nothing is returned), though in phpMyAdmin, the exact match i expect
is returned -
the query i am using to test this is specific enough to isolate the
result to one match.
Here is my query:
SELECT product_id as id, product_name, MATCH(product_id,
product_name,
notes,
material,
manufacturer,
country)
AGAINST ('+(>$search_term*)' IN BOOLEAN MODE)
AS m FROM quick_search WHERE MATCH(product_id,
product_name,
notes,
material,
manufacturer,
country)
AGAINST ('+(>$search_term*)' IN BOOLEAN MODE)
ORDER BY m DESC, product_name ASC
also, in my search app, if i search for something that doesn't exist, i
get tons of bad results - but in phpMyAdmin, i get 0, which is what i'd
like in the search app.
any clues to what's going on here, given the queries are identical?
thanks,
s7 1 2111 st******@hotmail.com wrote:
I have a FULLTEXT index.
when i query it for a specific item, i get different results in
phpMyAdmin, vs a PHP search app I'm developing.
In the PHP search app, the match I expect isn't returned (in fact
nothing is returned), though in phpMyAdmin, the exact match i expect
is returned -
the query i am using to test this is specific enough to isolate the
result to one match.
Here is my query:
SELECT product_id as id, product_name, MATCH(product_id,
product_name,
notes,
material,
manufacturer,
country)
AGAINST ('+(>$search_term*)' IN BOOLEAN MODE)
AS m FROM quick_search WHERE MATCH(product_id,
product_name,
notes,
material,
manufacturer,
country)
AGAINST ('+(>$search_term*)' IN BOOLEAN MODE)
ORDER BY m DESC, product_name ASC
also, in my search app, if i search for something that doesn't exist, i
get tons of bad results - but in phpMyAdmin, i get 0, which is what i'd
like in the search app.
any clues to what's going on here, given the queries are identical?
thanks,
s7
i fugured out the missing result problem, but not the part about
getting seemingly all the results when there is no match (which doesn't
happen in phpMyAdmin).
the first problem had to do with using an include file that limited the
results. i suppose the second problem is also php/app related.
thanks,
s7 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
by: Phil Powell |
last post by:
Retracing my problem leads me to believe I never successfully created
fulltext indexes for MySQL 3.23.58 MyISAM tables. I went to the MySQL
manual and was able - or so I thought - to create them,...
|
by: Alex Glass |
last post by:
I have a large contacts table with about 30 columns of text fields and 5
fulltext indexes spanning the different sections of the table. I'm curious
if anyone could suggest a better way to find...
|
by: Robert Oschler |
last post by:
I read a while back that MySQL will only use one index per query. (If this
is not so, please tell me and point me to a doc that gives a good
explanation of MySQL's current index usage policy). ...
|
by: Robert Oschler |
last post by:
I read a while back that MySQL will only use one index per query. (If this
is not so, please tell me and point me to a doc that gives a good
explanation of MySQL's current index usage policy). ...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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,...
|
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...
| |