Skip to content

Instantly share code, notes, and snippets.

@3manuek
Created April 27, 2016 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3manuek/cb815326a56bd2d29a0db23e0423455a to your computer and use it in GitHub Desktop.
Save 3manuek/cb815326a56bd2d29a0db23e0423455a to your computer and use it in GitHub Desktop.
Checking the contents of the index
(ftslab) > select *
from information_schema.INNODB_FT_INDEX_TABLE
WHERE lower(WORD) like '%country%';
+------------------+--------------+-------------+-----------+--------+----------+
| WORD | FIRST_DOC_ID | LAST_DOC_ID | DOC_COUNT | DOC_ID | POSITION |
+------------------+--------------+-------------+-----------+--------+----------+
| country | 149 | 787 | 28 | 733 | 265 |
| country | 149 | 787 | 28 | 733 | 1342 |
| countrydistricts | 733 | 733 | 1 | 733 | 816 |
| thecountry | 249 | 733 | 2 | 733 | 750 |
+------------------+--------------+-------------+-----------+--------+----------+
4 rows in set (0,08 sec)
(ftslab) > select *
from information_schema.INNODB_FT_INDEX_TABLE
WHERE DOC_ID = 155 AND lower(WORD) like '%country%';
+---------+--------------+-------------+-----------+--------+----------+
| WORD | FIRST_DOC_ID | LAST_DOC_ID | DOC_COUNT | DOC_ID | POSITION |
+---------+--------------+-------------+-----------+--------+----------+
| country | 149 | 787 | 28 | 155 | 31 |
| country | 149 | 787 | 28 | 155 | 495 |
| country | 149 | 787 | 28 | 155 | 158 |
| country | 149 | 787 | 28 | 155 | 525 |
+---------+--------------+-------------+-----------+--------+----------+
4 rows in set (0,09 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment