Re: mySQL FULL-TEXT search
[email protected] Wed, 1 Nov 2006 20:51:25 +0100
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Organization | Skupina SGH |
| Message-ID | <[email protected]> |
Additionally,
I thought that I solved my problem with the following sollution:
SELECT *
FROM maillog
WHERE MATCH (log) AGAINST ('some_string')
AND log LIKE '%another_string%'
BUT somehow this query returns results which include ANY of strings,
like there was "OR" operator.
How to do query with
MATCH (log) AGAINST (...)
having in mind that I do NOT search only for whole words, but also
within PART of words (like, search for "user" in "name.user@domain")
***************************
*** MY ORIGINAL MESSAGE ***
---------------------------
Hello experts,
I have a problem with full text search. Here is my situation:
In DB I have LOG records in "maillog" table,
with FULLTEXT index on "log" row.
When I do a search, I do:
SELECT *
FROM maillog
WHERE MATCH (log) AGAINST ('some_string' IN BOOLEAN MODE)
This is OK. Query is fast (0.15 sec on 500.000 records).
BUT when I want to narrow the search and include additional search
string, I have problems:
SELECT *
FROM maillog
WHERE MATCH (log) AGAINST ('some_string +another_string' IN BOOLEAN MODE)
The number of returned results are the same in both queries. Only
relevance changes.
If I do double query, I mean, first search for one string, and then
for another string inside this string, the query takes 20 seconds,
which is too long.
Any idea how to do full-text search for 2 or more search strings with
AND as boolean operator?
--
Best regards,
Andrej
----------------
[email protected]
----------------
-----------------------------
** END OF ORIGINAL MESSAGE **
*****************************
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/[email protected]