Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: full text
Forum PHP.pl > Forum > Bazy danych
arrtxp
Witam,
otóż pierwszy raz stworzyłem sobie full index, testuje... i rezultat: null. Choć powinno wyszukać rekordy... like % % działa...
Próbowałem wyszukać rozwiązania, doinformować się w guuglach...

Pytanie do Was: kiedy full index zadziała.
nospor
Zadziala, kiedy uzyjesz go prawidlowo. Skoro nie zadzialal, znaczy ze uzyles go nieprawidlowo. Czy to odpowiada na Twoje pytanie?
arrtxp
  1. SELECT * FROM news WHERE MATCH (title) AGAINST ('text');


Co niby tutaj jest źle ? Index jest założony.
nospor
np. to:
https://dev.mysql.com/doc/refman/5.0/en/ful...l-language.html
Cytat
Such a technique works best with large collections (in fact, it was carefully tuned this way). For very small tables, word distribution does not adequately reflect their semantic value, and this model may sometimes produce bizarre results. For example, although the word “MySQL” is present in every row of the articles table shown earlier, a search for the word produces no results:
mysql> SELECT * FROM articles
-> WHERE MATCH (title,body) AGAINST ('MySQL');
Empty set (0.00 sec)

The search result is empty because the word “MySQL” is present in at least 50% of the rows. As such, it is effectively treated as a stopword. For large data sets, this is the most desirable behavior: A natural language query should not return every second row from a 1GB table. For small data sets, it may be less desirable.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.