<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - Full-Text Search</title>
        <description>Forum for Full-Text Search</description>
        <link>https://forums.mysql.com/list.php?107</link>
        <lastBuildDate>Sat, 07 Mar 2026 09:30:22 +0000</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://forums.mysql.com/read.php?107,741486,741486#msg-741486</guid>
            <title>FULLTEXT initialization 200s (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,741486,741486#msg-741486</link>
            <description><![CDATA[ I found this issue when migrating servers in 2025/11. I migrated mysql to a server with almost the same configuration. The version is 5.7.44. There are some specific SQL sessions that are particularly long. However, this problem does not occur with the same data and the same SQL statement on other servers, and I tried to revert to 5.7.40 and still has this problem.<br />
<a href="https://dba.stackexchange.com/questions/87089/full-text-search-results-in-a-large-amount-of-time-spent-in-fulltext-initializa"  rel="nofollow">https://dba.stackexchange.com/questions/87089/full-text-search-results-in-a-large-amount-of-time-spent-in-fulltext-initializa</a><br />
My question is almost the same. And all tried. There are still problems. The queried table has 1000w pieces of data.<br />
<br />
For example, this one.<br />
select id from problem WHERE MATCH (problem_text) AGAINST (&#039;下面关于Android操作系统的描述中，正确的是&#039; IN BOOLEAN MODE) and is_del = 0 limit 5; <br />
 FULLTEXT initialization has 200s. But when I switch to NATURAL LANGUAGE MODE, I don&#039;t have this problem. But NATURAL LANGUAGE MODE is too poor at matching short texts]]></description>
            <dc:creator>a a</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Sun, 14 Dec 2025 17:56:11 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,707828,707828#msg-707828</guid>
            <title>Full Text Searching -- is it possible to speed up query with additional where clauses? (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,707828,707828#msg-707828</link>
            <description><![CDATA[ I&#039;m trying to optimize full text queries when I have a particular subset of rows I want to search. But I&#039;ve noticed that the query times do not improve. Am I doing something wrong:<br />
<br />
e.g,<br />
<br />
SELECT * FROM `blog_posts`<br />
WHERE `id` IN (1,2,3)<br />
AND MATCH (post_body) AGAINST (&#039;+mango +smoothie&#039; IN BOOLEAN MODE);<br />
<br />
takes the same amount of time as:<br />
<br />
SELECT * FROM `blog_posts`<br />
WHERE MATCH (post_body) AGAINST (&#039;+mango +smoothie&#039; IN BOOLEAN MODE);<br />
<br />
So there doesn&#039;t seem to be any time gained from drastically reducing the search pool to a small subset. Is there any way to accomplish a speedup in this case?<br />
<br />
I&#039;m using the InnoDB engine, id is the primary key, and there is a full text index on post_body.  Thanks for any insight!]]></description>
            <dc:creator>Joe Aliperti</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Wed, 15 Mar 2023 19:54:19 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,700061,700061#msg-700061</guid>
            <title>MATCH Keywords with Spaces AGAINST Large Text (11 replies)</title>
            <link>https://forums.mysql.com/read.php?107,700061,700061#msg-700061</link>
            <description><![CDATA[ We have a keyword database, for example:<br />
<br />
1 | MySQL<br />
2 | Database Developer<br />
3 | Software Engineer<br />
4 | Director of Development<br />
<br />
And we need a fast way to scan a large set of text (say a resume in base text) to match these exact words, with spaces.<br />
<br />
Granted, most of the text we&#039;re scanning is well over 1,000 characters, it could be something like:<br />
<br />
&quot;I am a Senior Software Engineer with Director of Development experience specializing in JavaScript, JSON, and Web Development. I also have Management experience and have worked in Banking, Cloud, and custom CRM development environments. I am also familiar with .NET and Kittens.&quot;<br />
<br />
We need to get exact matches for the keyword phrases; for example we want &quot;Director of Development&quot; to match, and not &quot;Director&quot; or &quot;Development&quot; by itself.<br />
<br />
Right now we are using REGEXP like this:<br />
<br />
SELECT<br />
    *<br />
FROM<br />
    sit_keyword sk<br />
WHERE<br />
    @large_resume_text REGEXP CONCAT(&#039;\\b&#039;,sk.keyword,&#039;\\b&#039;);<br />
<br />
It works fine, but it&#039;s very slow, and has issues with + and -. But it works - matching the FULL TEXT of the keyword and not just pieces of it.<br />
<br />
However, the fastest way to do this would be to use MATCH AGAINST. Note the sit_keyword table has a FULLTEXT index.<br />
<br />
e.g.<br />
<br />
SELECT<br />
    *<br />
FROM<br />
    sit_keyword sk<br />
WHERE<br />
    MATCH(sk.keyword) AGAINST (@large_resume_text);<br />
<br />
The problem is the MATCH AGAINST system breaks the words from the MATCH(col1) up into separate words. For example &quot;Software Engineer&quot; will return a match against the text if either word &quot;Software&quot; or &quot;Engineer&quot; is in the AGAINST target. Even if we put quotes around the col1 keywords, it&#039;s the same. This is causing our MATCH AGAINST to pull out keywords that are not true matches.<br />
<br />
I tried swapping MATCH to use the large resume text (over 1,000 characters) but AGAINST won&#039;t allow the definition of iterative values from our keyword database (at least I don&#039;t know how to define that in AGAINST. So it seems we&#039;re stuck requiring MATCH to use the database keywords and AGAINST to use the TEXT variable.<br />
<br />
The thing is if MATCH AGAINST actually used the whole &quot;phrase&quot; from the col1 keyword (e.g. &quot;Software Engineer&quot;) I think it would work just fine. But it won&#039;t.<br />
<br />
How can we force MATCH AGAINST to match the entire MATCH(col1) value against the target text, and not the individual words in col1? Is there another approach to do this?]]></description>
            <dc:creator>David Allen</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Wed, 22 Dec 2021 18:30:01 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,697861,697861#msg-697861</guid>
            <title>Unable to do Full Text Search by Character (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,697861,697861#msg-697861</link>
            <description><![CDATA[ I am trying to do a full text search in a Aurora MySQL database table. But it is not working if I try to do search based on single character. For ex:<br />
<br />
if I type &quot;e&quot;, it should return<br />
<br />
noodle, eagle, simple, beach<br />
<br />
Here is the sql query for it.<br />
<br />
SELECT * FROM Property<br />
WHERE MATCH (PropertyName,OwnerEntityName)<br />
AGAINST (&#039;e*&#039; In Boolean Mode);<br />
<br />
I have read in few search results, i have to configure ngram_token_size = 1<br />
<br />
but i dont know where to configure it in Aurora MySql .<br />
<br />
Any help on this would be appreciated.]]></description>
            <dc:creator>Dhilip Swaminathan</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Thu, 29 Jul 2021 11:11:15 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,695189,695189#msg-695189</guid>
            <title>partial word search with FULLTEXT (3 replies)</title>
            <link>https://forums.mysql.com/read.php?107,695189,695189#msg-695189</link>
            <description><![CDATA[ Query : select * from Student where MATCH (address) AGAINST ( &#039;(india*) (*India)&#039; IN BOOLEAN MODE)  ;<br />
<br />
which returns all address lines that contain the prefix &#039;india&#039;,<br />
such as<br />
<br />
India<br />
IndiaAsia<br />
<br />
but not<br />
<br />
SPIndiaTest<br />
Test2India<br />
<br />
How Can achieve This being * wild character in full text? <br />
<br />
Thank You <br />
Sumit Patel]]></description>
            <dc:creator>Sumit Patel</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Thu, 29 Jul 2021 16:30:31 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,671960,671960#msg-671960</guid>
            <title>import Arabic data (2 replies)</title>
            <link>https://forums.mysql.com/read.php?107,671960,671960#msg-671960</link>
            <description><![CDATA[ I have tried to import Arabic data by Table Data import wizard from a CSV file, but it does not work.<br />
I have used different Encoding options, but it shows ????? fro source column and data.<br />
<br />
Could you please help me to sort it out.]]></description>
            <dc:creator>Ramadan Elfaitouri</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Wed, 06 May 2020 23:51:58 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,671619,671619#msg-671619</guid>
            <title>Mysql: InnoDB: Error (Duplicate key) writing word node to FTS auxiliary index table? (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,671619,671619#msg-671619</link>
            <description><![CDATA[ Mysql: InnoDB: Error (Duplicate key) writing word node to FTS auxiliary index table<br />
<br />
I have above log with mysql.<br />
table have fulltext index  table did not able to response with above log when i  drop the index it works fine.<br />
<br />
how to resolve it?]]></description>
            <dc:creator>Sam Mathews</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Mon, 24 Dec 2018 10:55:08 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,670193,670193#msg-670193</guid>
            <title>how to handle string with parentheses (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,670193,670193#msg-670193</link>
            <description><![CDATA[ Hi,<br />
I have ngram to index my product name and description fields.<br />
<br />
Product name may have something like &quot;HP ink(No.21) ...&quot;<br />
<br />
when user use &quot;(No.21)&quot; to search for products, ngram matches lots of product with &quot;21&quot; <br />
<br />
Is there anyway to handle string with  parentheses?]]></description>
            <dc:creator>Adam Chen</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Thu, 01 Nov 2018 07:06:56 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,663703,663703#msg-663703</guid>
            <title>fulltext search with &quot;AND&quot; no results (1 reply)</title>
            <link>https://forums.mysql.com/read.php?107,663703,663703#msg-663703</link>
            <description><![CDATA[ hey guys,<br />
<br />
in germany, the word &quot;und&quot; means &quot;and&quot;.<br />
<br />
translated example:<br />
<br />
if i have a table &quot;books&quot; and a colun &quot;title&quot;, i have a book with title<br />
&quot;hunde und katzen&quot; ( =&gt; dogs and kats)<br />
<br />
my query is<br />
<br />
select * from books where match(title) against (&#039;und&#039;); // no results<br />
select * from books where match(title) against (&#039;hunde&#039;); // working<br />
<br />
i tried boolean mode, natural language mode etc. it seems like the word &quot;und&quot; <br />
is not indexed or something, maybe because it means AND and is not indexed?<br />
<br />
any ideas?]]></description>
            <dc:creator>Blaat Schaap</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Thu, 18 Jan 2018 18:46:44 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,663082,663082#msg-663082</guid>
            <title>Fulltextsearch + not working as expected (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,663082,663082#msg-663082</link>
            <description><![CDATA[ Hi,<br />
<br />
I try to test MySQL Fulltextsearch compared to SOLR. I set up an InnoDB table with an int-key and a longtext field including a fulltextindex.<br />
<br />
CREATE TABLE cvtext ( id int(11) NOT NULL AUTO_INCREMENT, cvtext longtext NOT NULL, PRIMARY KEY (id), FULLTEXT KEY cvtext (cvtext) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;<br />
<br />
By the way - I&#039;m using MySQL 4.6.16 and ft_min_word_len=3.<br />
<br />
My question is regarding the boolean search:<br />
<br />
1) select * from cvtext where MATCH(cvtext) AGAINST(&#039;+SQL&#039;) =&gt; results in:<br />
<br />
    2 oracle SQL database developer<br />
    1 oracle SQL database entwickler<br />
    3 oracle SQL database<br />
    5 oracle SQL datenbank developer entwickler<br />
<br />
2) select * from cvtext where MATCH(cvtext) AGAINST(&#039;+SQL +oracle&#039;) =&gt; results in:<br />
<br />
    2 oracle SQL database developer<br />
    1 oracle SQL database entwickler<br />
    3 oracle SQL database<br />
    5 oracle SQL datenbank developer entwickler<br />
    4 oracle datawarehouse developer entwickler<br />
<br />
So the first query is i.m.h.o. correct and returns only records with SQL included. The second query should do the same since I use &#039;+&#039; but it also returns record no 4. which doesn&#039;t contain SQL.<br />
<br />
Any ideas what could be wrong or did I not understand the query logic?]]></description>
            <dc:creator>Thomas Kernstock</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Thu, 14 Dec 2017 10:43:29 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,661191,661191#msg-661191</guid>
            <title>Full-Text search with join to keyword table (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,661191,661191#msg-661191</link>
            <description><![CDATA[ I have a large inventory file with a fulltext index on the description field. I also have a keyword table with numerous description keywords. I am looking for a fast way to return any records in the inventory file where the description matches against any keyword in the keyword file and we have stock?<br />
<br />
<br />
The query below does what I am looking for but it is very slow.. is there a way to use a fulltext match against in the join that would speed up the query?<br />
<br />
<br />
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br />
<br />
SELECT<br />
    p.partno, p.ohqty, p.descriptio , k.key2<br />
FROM<br />
    parts p<br />
    INNER JOIN keywords2 k ON p.descriptio LIKE CONCAT(&#039;%&#039;,k.key2,&#039;%&#039;)<br />
where  ohqty &gt; 0<br />
 order by key2<br />
<br />
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]]></description>
            <dc:creator>Jim Heffernan</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Fri, 29 Sep 2017 13:36:51 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,660777,660777#msg-660777</guid>
            <title>metadata for parser name (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,660777,660777#msg-660777</link>
            <description><![CDATA[ Where parser name that fulltext index used can be found in metadata?]]></description>
            <dc:creator>Serhiy Myrhorod</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Wed, 27 Sep 2017 10:08:01 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,659069,659069#msg-659069</guid>
            <title>why did FULLTEXT initialization took so long? (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,659069,659069#msg-659069</link>
            <description><![CDATA[ We are using mySQL 5.7 Fulltext search and find it took a long time for simple query like:<br />
<br />
select SQL_NO_CACHE ID from OBJECT_SEARCH where match(DATA) against (&#039;+bvgs&#039; in Boolean mode) limit 10;<br />
<br />
in profiling it shows:<br />
Status                  | Duration  | CPU_user | CPU_system | Context_voluntary | Context_involuntary | Block_ops_in | Block_ops_out | Messages_sent | Messages_received | Page_faults_major | Page_faults_minor | Swaps | Source_function       | Source_file          | Source_line |<br />
| FULLTEXT initialization | 17.650931 | 3.108000 |   0.724000 |             14983 |                1980 |       460608 |          9888 |             0 |                 0 |             10865 |             60683 |     0 | init_ftfuncs          | sql_base.cc          |        9867 |<br />
<br />
In manual it said FULLTEXT initialization is for (The server is preparing to perform a natural-language full-text search)<br />
<br />
But we have never performed natural-language FTS (we only do Boolean search)? why we need this step?<br />
<br />
Thanks very much for your guidance]]></description>
            <dc:creator>lisheng1 zhang1</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Tue, 25 Jul 2017 00:22:11 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,658123,658123#msg-658123</guid>
            <title>Search based on the words (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,658123,658123#msg-658123</link>
            <description><![CDATA[ Dear friends,<br />
<br />
Is there any way to consider two words as one.<br />
<br />
example if I am searching for <br />
1. &#039; &quot;green apple&quot; are sweet &#039;  <br />
2. &#039; &quot; green apple &quot; are better then &quot;red apple&quot; &#039;<br />
<br />
<br />
<br />
1 search string : &quot;green apple&quot; are sweet <br />
words present: (i) green apple<br />
               (ii) are <br />
               (iii) sweet .<br />
2 search string : &quot; green apple &quot; are better then &quot;red apple&quot;<br />
words present :(i) green apple<br />
               (ii) are <br />
               (iii) better<br />
               (iV) then<br />
               (v) red apple<br />
<br />
in first scenario , it consider &quot;green apple&quot; are only one word while searching. that makes it has three  words green apple , and are and sweet.<br />
in second it consider &quot;green apple&quot; as one word , are is second word , better is third word ,then  is fourth word and &quot;red apple&quot; is fifth word.<br />
<br />
So whenever it does the search , these words will always comes together.<br />
<br />
Do i have to write multiple match against clauses here ...]]></description>
            <dc:creator>Amit Kumar</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Tue, 13 Jun 2017 12:49:54 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,657952,657952#msg-657952</guid>
            <title>search based on words priority (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,657952,657952#msg-657952</link>
            <description><![CDATA[ Hi Team,<br />
<br />
I am working on a search query.<br />
in this query , if I am searching for &quot; word_1 word_2 word_3&quot;<br />
then I want the output in the below priority:<br />
<br />
&quot; word_1 word_2 word_3 &quot; <br />
&quot; word_1 word_2 &quot;<br />
&quot; word_1 word_3 &quot;<br />
&quot; word_2 word_3 &quot;<br />
&quot; word_1 &quot;<br />
&quot; word_2 &quot;<br />
&quot; word_3 &quot;<br />
<br />
I tried all the option available but not sure how to get this done in a query.<br />
<br />
<br />
<br />
SELECT issue_id,<br />
      identifier,<br />
      summary,<br />
      SUBSTR(content_text,1,200)                                                      AS content ,<br />
      MATCH(CONTENT_text) against(REPLACE(&#039;word_1 word_2 word_3 word_4 &#039;, &#039; &#039; , &#039; +&#039;) ) AS score<br />
    FROM HOOTSEARCH.HOOT_DATA<br />
    WHERE MATCH(CONTENT_text) against(REPLACE(&#039;word_1 word_2 word_3 word_4 &#039;, &#039; &#039; , &#039; +&#039;) IN BOOLEAN MODE ) ;<br />
<br />
here we are using score so we can order the result on the based of priority.<br />
<br />
<br />
PLEASE HELP]]></description>
            <dc:creator>Amit Kumar</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Tue, 06 Jun 2017 11:09:59 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,657642,657642#msg-657642</guid>
            <title>Encrypting Full Text tables? (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,657642,657642#msg-657642</link>
            <description><![CDATA[ So I have a table supporting a chat application we&#039;re evaluating (mattermost, to be precise). It uses a &#039;Posts&#039; folder to store the body text of messages/posts. The same body text must however be searchable.<br />
<br />
Since at-rest message encryption is not supported at the application level, I&#039;m using innodb tablespace encryption to satisfy the security requirement, which also protects backups. Binary logs are being purged.<br />
<br />
The problem thats left are the full text index auxiliary tables, which are stored in files alongside the user tables because TDE requires file_per_table setting. Is there a way to apply tablespace encryption to these index tables? If not, Is there any other way to protect data in these files? I&#039;m talking about the FTS_&lt;long string of numbers&gt;_&lt;lots of other numbers&gt;_INDEX_0 ... tables.]]></description>
            <dc:creator>Xing Liu</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Wed, 24 May 2017 05:58:54 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,657341,657341#msg-657341</guid>
            <title>Using sphinxSE in mySQL 5.7 for fulltext search (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,657341,657341#msg-657341</link>
            <description><![CDATA[ We are considering to put sphinxSE into mySQL 5.7 as a storage engine for fulltext search (5.7 innoDB fulltext search works for us feature-wise, we mainly want to explore performance improvement).<br />
<br />
I am familiar with mySQL build/deployment basic procedures, here i would like to get guidance at high-level (any big pit-fall so it is not doable or no advantage at all, for example), we expect to join innoDB/myISAM tables with sphinx table, any performance pit-falls?<br />
<br />
thanks very much for helps!]]></description>
            <dc:creator>lisheng1 zhang1</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Wed, 10 May 2017 20:52:20 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,657088,657088#msg-657088</guid>
            <title>make full-text search case sensitive (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,657088,657088#msg-657088</link>
            <description><![CDATA[ Does anyone else get empty set when issuing the following?  <br />
<br />
select * From articles where match(title, body) against(&#039;database&#039;) collate latin1_bin;<br />
<br />
I created the articles table and populated as per the example in <a href="https://dev.mysql.com/doc/refman/5.6/en/fulltext-natural-language.html"  rel="nofollow">https://dev.mysql.com/doc/refman/5.6/en/fulltext-natural-language.html</a><br />
<br />
Thanks in advance<br />
Grum]]></description>
            <dc:creator>Grum De Henseler</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Sat, 29 Apr 2017 07:06:52 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,656207,656207#msg-656207</guid>
            <title>Mysql 5.7 Fulltext search sometimes very slow (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,656207,656207#msg-656207</link>
            <description><![CDATA[ we have been using mySQL fulltext search for sometime and recently upgraded from 5.5 to 5.7 (using innoDB fulltext search now), it works well feature wise, thanks a lot!<br />
<br />
we noticed each morning the 1st fulltext search is usually rather slow (50s), if we repeat same SQL (even with SQL_NO_CACHE) it would be much faster (1-2s), we really need to overcome the initial slowness, your guidance would be really appreciated.<br />
<br />
Main Table (which has about 1.2M records):<br />
CREATE TABLE `OBJECT_SEARCH` (<br />
  `ID` bigint(20) unsigned NOT NULL,<br />
  `DATA` longtext,<br />
  `TITLE_DATA` longtext,<br />
  `APPEN_DATA` longtext,<br />
  PRIMARY KEY (`ID`),<br />
  FULLTEXT KEY `SEARCH_IDX` (`DATA`),<br />
  FULLTEXT KEY `SEARCH_TITLE_IDX` (`TITLE_DATA`),<br />
  FULLTEXT KEY `SEARCH_APPEN_IDX` (`APPEN_DATA`)<br />
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |<br />
<br />
FT variables (for our app we need to index all common words):<br />
innodb_ft_aux_table             |                |<br />
innodb_ft_cache_size            | 8000000        |<br />
innodb_ft_enable_diag_print     | OFF            |<br />
innodb_ft_enable_stopword       | OFF            |<br />
innodb_ft_max_token_size        | 84             |<br />
innodb_ft_min_token_size        | 1              |<br />
innodb_ft_num_word_optimize     | 2000           |<br />
innodb_ft_result_cache_limit    | 2000000000     |<br />
innodb_ft_server_stopword_table |                |<br />
innodb_ft_sort_pll_degree       | 2              |<br />
innodb_ft_total_cache_size      | 640000000      |<br />
innodb_ft_user_stopword_table   |                |<br />
<br />
<br />
SQL (we need to join a few tables to limit the search scope, without those constraints SQL would be much slower):<br />
SELECT DISTINCT b.ID,b.ACTIVITY_TIME FROM OBJECT_SEARCH AS c straight_join CV_13760_OBJECT_DATA AS b on ((b.ID)  =  (c.ID)) inner join CV_13760_OBJECTS AS a on ((b.ID)  =  (a.ID)) WHERE (((((((((((((((((((((((((b.TYPE)  =  &#039;27&#039;)  OR  (((b.TYPE)  =  &#039;29&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;20&#039;))))  OR  (((b.TYPE)  =  &#039;20&#039;)  AND  ((b.SUBTYPE)  NOT IN  (&#039;23&#039;))))  OR  (((b.TYPE)  =  &#039;16&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;18&#039;))))  OR  ((b.TYPE)  =  &#039;2&#039;))  OR  (((b.TYPE)  =  &#039;2&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;5&#039;))))  OR  (((b.TYPE)  =  &#039;16&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;18&#039;))))  OR  (((b.TYPE)  =  &#039;16&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;18&#039;))))  OR  (((b.TYPE)  =  &#039;2&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;1&#039;))))  OR  (((b.TYPE)  =  &#039;2&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;0&#039;))))  OR  ((b.TYPE)  =  &#039;38&#039;))  OR  (((b.TYPE)  =  &#039;2&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;7&#039;))))  OR  (((b.TYPE)  =  &#039;2&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;3&#039;))))  OR  ((b.TYPE)  =  &#039;22&#039;))  OR  (((b.TYPE)  =  &#039;2&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;7&#039;))))  OR  ((b.TYPE)  =  &#039;4&#039;))  OR  ((b.TYPE)  =  &#039;4&#039;))  OR  (((b.TYPE)  =  &#039;22&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;0&#039;))))  OR  (((b.TYPE)  =  &#039;2&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;7&#039;))))  OR  (((b.TYPE)  =  &#039;22&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;1&#039;))))  OR  (((b.TYPE)  =  &#039;20&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;23&#039;))))  OR  (((b.TYPE)  =  &#039;11&#039;)  AND  (((b.LIFECYCLE_STATE)  =  &#039;1&#039;)  OR  ((b.LIFECYCLE_STATE)  =  &#039;0&#039;))))  OR  (((b.TYPE)  =  &#039;11&#039;)  AND  (((b.LIFECYCLE_STATE)  =  &#039;1&#039;)  OR  ((b.LIFECYCLE_STATE)  =  &#039;0&#039;))))  OR  (((b.TYPE)  =  &#039;20&#039;)  AND  ((b.SUBTYPE)  IN  (&#039;23&#039;)))) AND ((match(c.TITLE_DATA) against(&#039; ( +vmoso)&#039; in Boolean Mode)  OR  match(c.DATA) against(&#039; ( +vmoso)&#039; in Boolean Mode))  OR  match(c.APPEN_DATA) against(&#039; ( +vmoso)&#039; in Boolean Mode)) AND ((b.STATUS)  IN  (&#039;1&#039;)) ORDER BY (b.ACTIVITY_TIME) DESC , (b.ID) DESC LIMIT 0,11;<br />
<br />
Query plan:<br />
+----+-------------+-------+------------+--------+--------------------------------------------------+---------+---------+---------------+-------+----------+----------------------------------------------+<br />
| id | select_type | table | partitions | type   | possible_keys                                    | key     | key_len | ref           | rows  | filtered | Extra                                        |<br />
+----+-------------+-------+------------+--------+--------------------------------------------------+---------+---------+---------------+-------+----------+----------------------------------------------+<br />
|  1 | SIMPLE      | a     | NULL       | index  | PRIMARY                                          | PRIMARY | 8       | NULL          | 39391 |   100.00 | Using index; Using temporary; Using filesort |<br />
|  1 | SIMPLE      | c     | NULL       | eq_ref | PRIMARY                                          | PRIMARY | 8       | vmoso_db.a.ID |     1 |    29.76 | Using where                                  |<br />
|  1 | SIMPLE      | b     | NULL       | eq_ref | PRIMARY,OBJECT_TYPE_INDEX,OBJECT_LIFECYCLE_INDEX | PRIMARY | 8       | vmoso_db.a.ID |     1 |     9.05 | Using where                                  |<br />
+----+-------------+-------+------------+--------+--------------------------------------------------+---------+---------+---------------+-------+----------+----------------------------------------------+<br />
<br />
In query plan i did not fulltext index is mentioned (without using fulltext index how could above SQL get executed?)<br />
<br />
Thanks very much for helps]]></description>
            <dc:creator>lisheng1 zhang1</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Tue, 21 Mar 2017 20:07:41 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,654522,654522#msg-654522</guid>
            <title>Slow full text index search in Mysql 5.7 (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,654522,654522#msg-654522</link>
            <description><![CDATA[ Hi All,<br />
<br />
We have recently upgraded our Mysql Dev servers from 5.6.27 to 5.7.15.<br />
After upgrade we are facing some issues with full text index.<br />
<br />
Query in our case is:<br />
<br />
SELECT * FROM (SELECT * FROM TABLENAME WHERE COLUMN2=KEYWORD2)FOO WHERE MATCH(COLUMN1) AGAINST(KEYWORD IN BOOLEAN MODE)<br />
<br />
<br />
P.N We are filtering rows by using subquery as table has more than 45 million rows.<br />
<br />
<br />
Before upgrade query used to run within seconds(1-2 seconds max).But after upgrade query is taking minutes.<br />
<br />
After checking the plan,we found that query is being optmized into following format as there are some optmization with derived tables in 5.7.15.<br />
<br />
SELECT * FROM TABLENAME WHERE COLUMN2=KEYWORD2 AND MATCH(COLUMN1) AGAINST(KEYWORD IN BOOLEAN MODE).<br />
<br />
So we disabled the derived table marge by changing the optimizer_switch variables with derived_merge=off.<br />
<br />
but then it started giving error-Can&#039;t find FULLTEXT index matching the column list<br />
<br />
On further investigation,we found that in mysql 5.7.6 onwards internal temp tables engine is changed from myisam to innodb.<br />
so we changed internal_tmp_disk_storage_engine to myisam(full text index run in boolean mode without index creation)<br />
<br />
then it started giving error-can not create full text index on materialized subquery.<br />
<br />
We tried disabling materialization from optmizer switch variable.but id didn&#039;t help.<br />
Need help to resolve this.<br />
<br />
Thanks<br />
Suraj]]></description>
            <dc:creator>Suraj Sawant</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Tue, 24 Jan 2017 08:05:28 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,648747,648747#msg-648747</guid>
            <title>MariaDB and MATCH AGAINST Query (3 replies)</title>
            <link>https://forums.mysql.com/read.php?107,648747,648747#msg-648747</link>
            <description><![CDATA[ Hi<br />
<br />
something weird:<br />
<br />
- two identical databases with the same dataset. One on my local computer XAMPP &amp; mySQL, the other one on a Diskstation MariaDB.<br />
- an nearly identical table b_entry with a FULLTEXT-index (3 columns: title, sht, lot); engines are InnoDB (mySQL) and myISAM (MariaDB), but this should not take effect.<br />
- an identical SELECT (working on a fulltext-search - yes, it&#039;s a bit rough, but it&#039;s work in progress :) ):<br />
<br />
SELECT DISTINCT b.id, b.title, b.shtext, b.lotext<br />
FROM b_entry b, b_category c, b_entry2user eu<br />
WHERE (<br />
(MATCH(b.title, b.shtext, b.lotext) AGAINST(&#039;[searchterm]&#039;))<br />
OR (b.title LIKE &#039;%[searchterm]%&#039; OR b.shtext LIKE &#039;%[searchterm]%&#039; OR b.lotext LIKE &#039;%[searchterm]%&#039;)<br />
)<br />
AND b.archive = 0<br />
AND (<br />
(b.categoryId = 4 AND b.id = eu.entryId AND eu.userId = [id])<br />
OR (b.categoryId = c.id AND c.parentId = 3 AND b.id = eu.entryId AND eu.userId = [id])<br />
OR (b.categoryId = c.id AND c.parentId = 2)<br />
OR (b.categoryId = c.id AND c.parentId = 1)<br />
);<br />
<br />
Testing with mySQL I do get a resulstset with XX rows.<br />
Testing with MariaDB I get an empty resultset, using the same searchterm and the same id?<br />
<br />
What am I missing here?!?<br />
<br />
Any help very appreciated!!]]></description>
            <dc:creator>SGK Stmk</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Thu, 11 Aug 2016 12:34:23 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,646966,646966#msg-646966</guid>
            <title>FTS remains existent after dropping index (6 replies)</title>
            <link>https://forums.mysql.com/read.php?107,646966,646966#msg-646966</link>
            <description><![CDATA[ We dropped all full text indexes from a Innodb-table. The FTS files are still present in the file System. Even more, at at sartup the system hangs a long time with following transaction: <br />
<br />
fetching indexed FTS document<br />
<br />
This locks the table for a long time.<br />
<br />
How do we get rid of the files and of this Transaction at startup time?]]></description>
            <dc:creator>Wolfgang Zuser</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Mon, 03 Oct 2016 06:31:07 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,643695,643695#msg-643695</guid>
            <title>MySQL Full Text Search - So many Indexes (1 reply)</title>
            <link>https://forums.mysql.com/read.php?107,643695,643695#msg-643695</link>
            <description><![CDATA[ 1) I am using XAMPP. MySQL Server version: 10.1.9-MariaDB<br />
 <br />
Table corp_news has around 10,000 rows.<br />
 <br />
I am using below query to create Index using PHPMyADmin.<br />
<br />
ALTER TABLE corp_news ADD FULLTEXT INDEX `corp_nz` (`content` ASC, `subject` ASC);<br />
<br />
After running this query, On left hand side menu, when i click the &quot;index&quot; from the tree i see many indexes named like<br />
 <br />
content2<br />
content3<br />
content4<br />
.<br />
.<br />
.<br />
.<br />
content37 <br />
subject2<br />
subject3<br />
subject4<br />
.<br />
.<br />
.<br />
.<br />
subject36<br />
subject37 <br />
 <br />
I thought it would create only one Index table named &quot;corp_nz&quot;. what the heck so many index tables about? Is this normal?<br />
 <br />
<br />
 <br />
2)  If this is the case, how can i even drop the full text index on &quot;corp_news&quot; table?]]></description>
            <dc:creator>Natasha na</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Sun, 20 Mar 2016 05:06:12 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,643451,643451#msg-643451</guid>
            <title>Distance and Wildcards (3 replies)</title>
            <link>https://forums.mysql.com/read.php?107,643451,643451#msg-643451</link>
            <description><![CDATA[ Dear all,<br />
<br />
I&#039;m running a full text index on a rather huge database which I&#039;d like to run the following query against:<br />
<br />
[...]<br />
MATCH(doc_text) AGAINST (&#039;&quot;+capital* +market* +union*&quot; @5&#039; IN BOOLEAN MODE)<br />
[...]<br />
<br />
This query returns results for anything, that contains the words &quot;capital market union&quot; in a max. distance of 5 words.<br />
<br />
However, it does not return anything in the distance of 5 words that is &quot;capital markets union&quot; - notice the s in markets, which I&#039;d like to cover with the wildcard. Why?<br />
<br />
Of course, if I change it to <br />
<br />
[...]<br />
MATCH(doc_text) AGAINST (&#039;+capital* +market* +union*&#039; IN BOOLEAN MODE)<br />
[...]<br />
<br />
I get anything that contains capital, market, markets, union, unions separately somewhere in the text.<br />
<br />
How can I use distance + wildcard?<br />
<br />
Thanks a lot,<br />
Thomas]]></description>
            <dc:creator>Thomas H.</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Sun, 13 Mar 2016 05:03:29 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,643053,643053#msg-643053</guid>
            <title>Problam in Full Text Search (1 reply)</title>
            <link>https://forums.mysql.com/read.php?107,643053,643053#msg-643053</link>
            <description><![CDATA[ -- Insert stopwords (for simplicity, a single stopword is used in this example)<br />
<br />
mysql&gt; INSERT INTO my_stopwords(value) VALUES (&#039;want&#039;);<br />
Query OK, 1 row affected (0.00 sec)<br />
<br />
-- Create the table<br />
<br />
mysql&gt; CREATE TABLE t1 (<br />
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,<br />
phrase TEXT(500)<br />
) ENGINE=InnoDB;<br />
<br />
-- Insert data into the table<br />
<br />
mysql&gt; INSERT INTO t1(phrase) VALUES<br />
(&#039;I want Iphone 6s about&#039;);<br />
<br />
-- Set the innodb_ft_server_stopword_table option to the new stopword table<br />
<br />
mysql&gt; SET GLOBAL innodb_ft_server_stopword_table = &#039;test/my_stopwords&#039;;<br />
Query OK, 0 rows affected (0.00 sec)<br />
<br />
-- Create the full-text index (which rebuilds the table if no FTS_DOC_ID column is defined)<br />
<br />
mysql&gt; CREATE FULLTEXT INDEX idx ON t1(phrase);<br />
<br />
mysql&gt; SELECT * FROM t1 WHERE MATCH (phrase) AGAINST (&#039;Iphone&#039; IN NATURAL LANGUAGE MODE);<br />
+----+------------------------+<br />
| id | phrase                 |<br />
+----+------------------------+<br />
|  1 | I want Iphone 6s about |<br />
+----+------------------------+<br />
1 row in set (0.00 sec)<br />
<br />
mysql&gt; SELECT * FROM t1 WHERE MATCH (phrase) AGAINST (&#039;want&#039; IN NATURAL LANGUAGE MODE);<br />
Empty set (0.00 sec)<br />
<br />
Till this It works good.<br />
<br />
After this I add &#039;Iphone&#039; in my_stopwords table. <br />
<br />
then I run bellow query, and I get result. &#039;Iphone&#039; is same as &#039;want&#039;, Bellow query should not return any result but it returns.<br />
<br />
SELECT * FROM t1 WHERE MATCH (phrase) AGAINST (&#039;Iphone&#039; IN NATURAL LANGUAGE MODE);<br />
<br />
Is there any mistake. <br />
I wanted like this. Any search word from &#039;my_stopwords&#039; table should not return any result.]]></description>
            <dc:creator>Jaydeep Patel</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Mon, 07 Mar 2016 05:07:43 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,641320,641320#msg-641320</guid>
            <title>Regarding FTS and Like queries (4 replies)</title>
            <link>https://forums.mysql.com/read.php?107,641320,641320#msg-641320</link>
            <description><![CDATA[ Hi,<br />
<br />
I new with full text search, I have an issue that i have a table catalog_product_entity_varchar that has billions of records (44500000+) and it has a field named value and most of query written in as to search <br />
<br />
where `value` like &#039;%Hitachi Brush Cutter%&#039;<br />
<br />
I want to use FTS on field value and get benefit of FTS, How can I do this as results are different of both queries, seems something wrong.<br />
<br />
 select * from catalog_product_entity_varchar where `value` like &#039;%Hitachi Brush Cutter%&#039;<br />
 select * from catalog_product_entity_varchar where match(`value`) against (&#039;Hitachi Brush Cutter&#039;)<br />
<br />
I have user search in natural and bolean mode, but result are not same.<br />
<br />
Pl suggest, i am using mysql 5.6.value field is varchar(255) with charset utf8 and table is innodb.]]></description>
            <dc:creator>Devrishi Shandilya</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Sat, 23 Jan 2016 00:38:37 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,635875,635875#msg-635875</guid>
            <title>Insert Arabic in the database (1 reply)</title>
            <link>https://forums.mysql.com/read.php?107,635875,635875#msg-635875</link>
            <description><![CDATA[ I want to add Arabic to the database by a PHP page I&#039;ve set the database&#039;s collation to utf8_general_ci ad the tables as same as the database. And I used:<br />
mysqli_query($conn, &quot;SET character_set_results = &#039;utf8&#039;, character_set_client = &#039;utf8&#039;, character_set_connection = &#039;utf8&#039;, character_set_database = &#039;utf8&#039;, character_set_server = &#039;utf8&#039;&quot;);<br />
And<br />
mysqli_query($conn, &quot;SET NAMES &#039;utf8&#039;&quot;); <br />
mysqli_query($conn, &quot;SET CHARACTER SET utf8&quot;); <br />
And <br />
mysqli_query($conn, &quot;SET NAMES cp1256&quot;);<br />
mysqli_query($conn, &quot;set characer set cp1256&quot;);<br />
And escaped the strings but no one had worked the data is like this<br />
&amp;#1605;&amp;#1578;&amp;#1610; &amp;#1575;&amp;#1589;&amp;#1583;&amp;#1585;..]]></description>
            <dc:creator>Ahmed Nezar</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Thu, 15 Oct 2015 23:18:17 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,634126,634126#msg-634126</guid>
            <title>Which Performs Better? (1 reply)</title>
            <link>https://forums.mysql.com/read.php?107,634126,634126#msg-634126</link>
            <description><![CDATA[ I have three fields defined as fulltext: name, address, city<br />
<br />
I know they likely are not equivellent, but which performs better?<br />
<br />
A)<br />
INDEX name FULLTEXT on name<br />
INDEX address FULLTEXT on address<br />
INDEX city FULLTEXT on city<br />
SELECT * FROM TABLE<br />
WHERE MATCH(name) AGAINST (&#039;QUERY&#039; IN BOOLEAN MODE)<br />
   OR MATCH(address ) AGAINST (&#039;QUERY&#039; IN BOOLEAN MODE)<br />
   OR MATCH(city) AGAINST (&#039;QUERY&#039; IN BOOLEAN MODE)<br />
<br />
-OR-<br />
<br />
B)<br />
INDEX name_address_city FULLTEXT on name, address, city<br />
SELECT * FROM TABLE<br />
WHERE MATCH(name, address, city) AGAINST (&#039;QUERY&#039; IN BOOLEAN MODE)]]></description>
            <dc:creator>Michael Lawson</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Sat, 22 Aug 2015 19:07:15 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,634125,634125#msg-634125</guid>
            <title>Full-Text Search Across Multiple Fields (1 reply)</title>
            <link>https://forums.mysql.com/read.php?107,634125,634125#msg-634125</link>
            <description><![CDATA[ I have three fields defined as fulltext: name, address, city<br />
<br />
SELECT * FROM TALBE WHERE MATCH(name, address, city) AGAINST (&#039;QUERY&#039; IN BOOLEAN MODE)<br />
<br />
If I had the records:<br />
   1) James Smith | 123 Anywhere Ave | Springfield<br />
   2) Jane Smith | 456 James Ct | Smithville<br />
<br />
If I query on &quot;Springfield +James&quot; I would expect to get back JUST #1, but I am getting 1 and 2.  Can somebody please explain why, when I request Springfield AND James, I get #2 which only has James?]]></description>
            <dc:creator>Michael Lawson</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Sat, 22 Aug 2015 19:15:01 +0000</pubDate>
        </item>
        <item>
            <guid>https://forums.mysql.com/read.php?107,632737,632737#msg-632737</guid>
            <title>InnoDB Full Text Search (no replies)</title>
            <link>https://forums.mysql.com/read.php?107,632737,632737#msg-632737</link>
            <description><![CDATA[ <a href="http://www.slideshare.net/mattalord/getting-started-with-mysql-full-text-search"  rel="nofollow">http://www.slideshare.net/mattalord/getting-started-with-mysql-full-text-search</a>]]></description>
            <dc:creator>Edwin Desouza</dc:creator>
            <category>Full-Text Search</category>
            <pubDate>Wed, 08 Jul 2015 23:50:32 +0000</pubDate>
        </item>
    </channel>
</rss>
