|
|||||||||||
|
FTS query questions
From: Sunny Bains <Sunny.Bains(at)oracle.com>
Date: Mon Sep 17 2007 - 22:04:54 EDT
I have two question, one regarding the (MyISAM) query results and the other regarding the reason why MySQL passes NO_SUCH_KEY when it calls the engine for queries that specify multiple FTS indexes to search. Given the following table def:
CREATE TABLE t (
FULLTEXT (title), FULLTEXT (text1), FULLTEXT (text2) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
*First question*
SELECT * FROM t
MySQL calls the engine, with the FTS index to search set to NO_SUCH_KEY, #0 ft_init_boolean_search (info=0x8b93e98, keynr=4294967295,
query=0x8b8f4d0 "Two", query_len=3, cs=0x86afba0)
at ft_boolean_search.c:534
query=0x8b8f4d0 "Two", query_len=3, cs=0x86afba0, record=0x8b93090 "\004")
at ft_static.c:64
inx=4294967295, key=0x8b8f4e0) at ha_myisam.h:89
at item_func.cc:4885
no_order=false) at sql_base.cc:7327
I think MySQL should pass in the ids of the FTS indexes that need to be searched. Is it possible to get hold of this information from somewhere? *Second question* and MyISAM from what I can understand then looks up the terms in the query starting from the first FTS index defined on the table. See MySQL query output below for my reasoning. Is my conclusion above correct ?
mysql> select * from t;
| 1 | Title1 | One | One | | 2 | Title2 | Two | One | | 3 | Title3 | Three | One | | 4 | Title4 | Four | One | +----+--------+-------+-------+ mysql> SELECT * FROM t WHERE MATCH (title, text1)
AGAINST ('One' IN BOOLEAN MODE);
I get no match for the above query but when I run the following queries I get a match: mysql> SELECT * FROM t WHERE MATCH (title, text1)
AGAINST ('Title1 One' IN BOOLEAN MODE);
+----+--------+------+-------+
mysql> SELECT * FROM t WHERE MATCH (title, text1)
AGAINST ('Title1' IN BOOLEAN MODE);
+----+--------+------+-------+
Regards,
-- MySQL Internals Mailing List For list archives: http://lists.mysql.com/internals To unsubscribe: http://lists.mysql.com/internals?unsub=lists@pantek.comReceived on Mon Sep 17 22:05:58 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 07:59:29 EDT |
||||||||||
|
|||||||||||