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. 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 אינדקסים rebuilt. The following command to do a quick repair operating is sufficient to rebuild the indexes: את הפקודה הבאה כדי לבצע הפעלה מהירה לתקן מספיק כדי לבנות מחדש את לאינדקס:

mysql> REPAIR TABLE tbl_name QUICK; MySQL> TABLE tbl_name תיקון מהיר;

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] סעיף) על מנת לבצע את rebuilt בתור טקסט מלא הפרמטרים הם רק מוכרים mysqld Server. 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. שלא כמו האדם תרגום, תרגום מכונה אינו מבין את הדקדוק, סמנטיקה, תחביר, idioms של שפה טבעית, ולכן לעיתים קרובות לא מדויקים ו לייצר באיכות נמוכה טקסט שהוא מטעה ו מובנת. Thus, please refer to לכן, אנא פנה אל original English article המאמר המקורי באנגלית when in doubt. במקרה של ספק.



2 Responses to “How to Change MySQL FULLTEXT Index Minimum and Maximum Length of Words” 2 תגובות ל "כיצד לשנות MySQL FULLTEXT אינדקס מינימום ומקסימום אורך של מילים"

  1. admin Admin
    May 11th, 2008 08:21 11 מאי 2008 08:21
    2 2

    Depends. תלוי. Normally it's located in /etc בדרך כלל זה הנמצא ב / etc

  2. chichilatte chichilatte
    May 11th, 2008 02:49 11 מאי 2008 02:49
    1 1

    Yes, thnks, but where is this mysterious config file “my.cnf”? כן, thnks, אבל איפה זה מסתורי קובץ תצורה "my.cnf"?

Leave a Reply השאירו תגובה

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> אתה יכול להשתמש בקבצי תגיות: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <דל datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. הצטרף כמנוי ל הערות תכונה הושבת. To receive notification of latest comments posted, subscribe to כדי לקבל הודעה על תגובות העדכנית פורסם, כדי להירשם Tip and Trick Comments RSS feed טריק Tip ו תגובות RSS Feed or או register to receive הרשמה לקבלת new comments in daily email digest. תגובות חדש ב דוא"ל תקציר יומי.
Custom Search

Incoming Search Terms for the Article חיפוש נכנס על תנאי סעיף

mysql rebuild fulltext index MySQL לבנות fulltext לאינדקס - -- mysql fulltext index MySQL fulltext לאינדקס - -- rebuild fulltext index mysql לבנות מחדש באינדקס fulltext MySQL - -- mysql rebuild index MySQL לבנות לאינדקס - -- mysql minimum word length MySQL מינימום אורך מילה - -- mysql update fulltext index MySQL עדכון fulltext לאינדקס - -- mysql rebuild FULLTEXT indexes MySQL לבנות מחדש FULLTEXT אינדקסים - -- mysql rebuild fulltext MySQL לבנות fulltext - -- rebuild fulltext indexes MySQL fulltext לבנות אינדקסים MySQL - -- fulltext index mysql באינדקס fulltext MySQL - -- mysql minimum length MySQL מינימום אורך - -- mysql index rebuild MySQL לאינדקס לבנות מחדש - -- mysql rebuild full text index MySQL לבנות אינדקס הטקסט המלא - -- mysql fulltext index length MySQL fulltext אורך לאינדקס - -- rebuild index MYSQL לבנות אינדקס MySQL - -- rebuild fulltext mysql לבנות מחדש fulltext MySQL - -- mysql text index length MySQL אורך הטקסט באינדקס - -- rebuild mysql fulltext index לבנות מחדש MySQL fulltext לאינדקס - -- search חיפוש - -- mysql fulltext MySQL fulltext - -- minimum word length fulltext אורך המילה המינימלי fulltext - -- mysql fulltext minimum characters MySQL fulltext מינימום תווים - -- wm6 mysql wm6 MySQL - -- mysql change index length MySQL לשנות אורך לאינדקס - -- mysql fulltext length MySQL fulltext אורך - -- length mysql אורך MySQL - -- mysql fulltext ft_min_word_len MySQL fulltext ft_min_word_len - -- change mysql fulltext length שינוי אורך MySQL fulltext - -- mysql full text keyword length MySQL אורך הטקסט המלא של מילות מפתח - -- all הכל - -- fulltext min chars fulltext דק chars - -- ft_min_word_len change ft_min_word_len לשנות - -- fulltext search minimum length fulltext חיפוש מינימום אורך - -- mysql change search minimum length MySQL שינוי אורך מינימלי חיפוש - -- minimum and maximum word length full-text parameters מינימום ומקסימום המילה אורך טקסט מלא פרמטרים - -- mysql fulltext minimum word length MySQL fulltext מינימום אורך מילה - -- fulltext mysql fulltext MySQL - -- how to rebuild FULLTEXT index MySQL כיצד לבנות מחדש FULLTEXT לאינדקס MySQL - -- fulltext length אורך fulltext - -- mysql minimum search 3 chars help MySQL מינימום 3 chars חיפוש עזרה - -- mysql full text search 3 chars MySQL חיפוש טקסט מלא 3 תווים - -- full text index mysql 3 letter words הטקסט המלא אינדקס MySQL 3 מילים מכתב - -- update fulltext index mysql עדכון באינדקס fulltext MySQL - -- mysql 3 letter fulltext MySQL 3 מכתב fulltext - -- mysql full text search minimum length 3 MySQL חיפוש טקסט מלא אורך מינימום 3 - -- mysql maximum indexes MySQL מקסימלית אינדקסים - -- mySQL full text search 3 letter words MySQL חיפוש טקסט מלא 3 מילים מכתב - -- how to change minimum word length for full text search in mysql כיצד לשנות מילה באורך המינימלי עבור חיפוש טקסט מלא MySQL - -- set mysql full text search minimum word length בחר חיפוש טקסט מלא MySQL מינימום אורך מילה - -- mysql full text search min length חיפוש טקסט מלא MySQL דק באורך - --