FULLTEXT inconsistency

FULLTEXT inconsistency

am 09.01.2007 02:34:25 von starman7

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

Re: FULLTEXT inconsistency

am 09.01.2007 03:38:19 von starman7

starman7@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