How to Change MySQL FULLTEXT Index Minimum and Maximum Length of Words Як змінити MySQL FULLTEXT індекс Мінімальна і максимальна довжина слова
MySQL database has built-in full-text search capability that allows SQL queries to perform search quickly using MySQL database engine. MySQL бази даних вбудована в повнотекстової пошук можливостей, що дозволяє SQL запитів для виконання швидкого пошуку з використанням MySQL Database Engine. The full-text search capability depends on the FULLTEXT index which is been created on various table fields or columns. Повнотекстового пошуку можливостей залежить від FULLTEXT індекс, який був створений на різні поля таблиці або стовпчиків. However, some search queries may not return the experted results or datasets, even though the data is verified to exists on full-text search, especially on short keywords or search terms. Однак, деякі пошукові запити, які не можуть повернути experted результатів або даних, навіть незважаючи на те, що дані перевірки існує для повнотекстового пошуку, особливо на коротких ключових слів або параметрів пошуку.
The problem probably lies on the default minimum length of words indexed by FULLTEXT index which is set as 4 characters. Ця проблема, ймовірно, перебуває на стандартній мінімальної довжини слова індексуються FULLTEXT індекс, що встановлюється в 4 символів. Thus, when attempting to search via full-text index, the short words are not indexed, and hance not return in search results. Таким чином, при спробі пошуку по повних текстів індекс, коротких слів, не індексуються, і hance не повертатися в результатах пошуку.
By default, the minimum value for length of word to be indexed in FULLTEXT index is four characters, while the default maximum length of words to be indexed in FULLTEXT index is varies depending on version of mySQL server. За замовчуванням, мінімальне значення довжини слово буде індексуватися в FULLTEXT індекс чотирьох символів, у той час як за замовчуванням максимальна довжина слова буде індексуватися в FULLTEXT індекс коливається в залежності від версії MySQL-сервера. To increase the number of words indexed and searchable, especially shorter words such as three-character words, administrator can reduce the minimum or increase the maximum length of words to be indexed by using ft_min_word_len and ft_max_word_len system variables. Для збільшення кількості слів індексується і пошуку, особливо короткі слова, такі, як три символи словами, адміністратор може зменшити або збільшити мінімальний максимальна довжина слова буде індексуватися за допомогою ft_min_word_len і ft_max_word_len системних змінних.
For example, for FULLTEXT index to index the three-character words, or 3-letter text, add in the following line to set the lower value for ft_min_word_len variable under [mysqld] section to an option file, ie my.cnf: Наприклад, для FULLTEXT індексу до індексу трьох символів, слів, або 3 літери тексту, додати в наступному рядку встановити менше значення для змінної ft_min_word_len в розділі [mysqld] розділ варіант файлу, тобто my.cnf:
[mysqld]
ft_min_word_len=3
Save the file, and then restart the MySQL server. Збережіть файл і перезавантажте сервер MySQL. After changing either value of full-text variable, which both affects indexing, the FULLTEXT indexes must be rebuilt. Після зміни значення або повний текст змінну, яка впливає як індексування, то FULLTEXT індекси повинні бути відновлені. The following command to do a quick repair operating is sufficient to rebuild the indexes: В наступну команду, щоб зробити швидкий ремонт діючих достатньо, щоб відновити індекс:
mysql> REPAIR TABLE tbl_name QUICK; MySQL> Ремонт ТАБЛИЦЯ tbl_name QUICK;
Note that each and every table that contains any FULLTEXT index must be repaired with SQL command above. Зауважимо, що кожну таблицю, яка містить будь-які FULLTEXT індекс повинен бути відремонтований з SQL команди вище. Also do not use myisamchk (unless you have also defined the full-text parameter values in [myisamchk] section) to perform the rebuilt as the full-text parameters are only known to mysqld server. Також не використовуйте myisamchk (якщо у вас є також визначили повний текст значень параметра в [myisamchk] розділ) для виконання, як відновити повний текст параметрами є тільки відомі сервер mysqld. If rebuild is not done, queries for the table may yield incorrect results, and modifications to the table will cause the server to see the table as corrupt and in need of repair. Якщо відновлення не відбувається, запити до таблиці може давати неправильні результати, а також зміни в таблиці призведе до сервера, щоб побачити таблицю, як корумповані і потребує ремонту.
IMPORTANT : You're reading a machine translated page which is provided "as is" without warranty. ВАЖЛИВО: Ви читаєте машина переведена сторінку, яка надається "як є" без гарантії. Unlike human translation, machine translation does not understand the grammar, semantics, syntax, idioms of natural language, thus often produce inaccurate and low quality text which is misleading and incomprehensible. На відміну від людини перекладу, машинний переклад не розуміє граматика, семантика, синтаксис, ідіоми природної мови, таким чином, часто роблять неточні і низька якість тексту, який вводить в оману і незрозумілим. Thus, please refer to Таким чином, зверніться до original English article Англійська оригінальні статті when in doubt. , Коли сумніви.
Related Articles Статті по темі
- MySQL Workbench - Visual Database Deign Tool Free Download MySQL Workbench - Visual Database соблаговоліть Інструмент Free Download
- Aqua Words Free Word Puzzle Game from Realore Studios at GAOTD Аква Слова Безкоштовно Word головоломка гра від Realore Studios в GAOTD
- 64-bit (x64) Windows Vista SP1 (6001.1800) tcpip.sys Auto Patcher to Fix Event ID 4226 and Unlock Increase Maximum Connections Allowed 64-розрядний (x64) Windows Vista SP1 (6001.1800) tcpip.sys Авто Patcher виправити Подія ID 4226 та розблокування збільшити максимальний Підключення Дозволено
- How to Change the Display Language (Including Welcome Screen) in Windows Vista Як змінити мову відображення (в тому числі Привітання екрану) в Windows Vista
- How to Change Icon of Shortcut in Windows Vista Як змінити Ікона ярликів в Windows Vista
- How to Activate or Change to Windows Vista Ultimate Extras Glass or Pearl Sound Scheme Як активувати або змінити на Windows Vista Ultimate Екстра скла або перлина Звукова схема
- How to Change the Microsoft Office Excel Protect Sheet Password Як змінити в Microsoft Office Excel Захистити лист Пароль
- Download Windows Search 4.0 Preview Завантажити Windows 4.0 Попередній пошук
- How to Enable PAE in x86 32-bit Windows Server 2003 and 2000 to Use Large 4GB or More RAM Memory Як включити PAE у x86 32-розрядної Windows Server 2003 і 2000 роках на використання великих і більше 4 ГБ ОЗУ
- Make Searches with Natural Language on Powerset Search Engine Зробити сайт з Natural Language на Powerset пошуку










































May 11th, 2008 08:21 11 травня 2008 08:21
Depends. Залежить. Normally it's located in /etc Зазвичай він знаходиться в / i т.д.
May 11th, 2008 02:49 11 травня 2008 02:49
Yes, thnks, but where is this mysterious config file “my.cnf”? Так, thnks, але де ж ця таємнича конфігураційний файл "my.cnf"?