MySQL FULLTEXT, не работающий

можно использовать WMI в .net также, но Вы тогда зависите от wmi сервиса, работающего и т.д. Иногда, это работает локально, но тогда перестали работать, когда тот же код выполняется на серверах. Я полагаю, что это - проблема пространства имен, связанная с "именами", значения которых Вы читаете.

25
задан Ross 14 July 2009 в 16:01
поделиться

2 ответа

Добавить данные. По умолчанию MySQL игнорирует любое слово, содержащееся в 50% или более строк в таблице, поскольку считает, что это слово «шум».

При очень небольшом количестве строк в таблице этот предел в 50% обычно достигается часто (т. Е. Если у вас две строки, каждое слово находится как минимум в 50% строк!).

49
ответ дан 28 November 2019 в 18:04
поделиться

There are two modes for MySQL Fulltext searching: natural language mode and Boolean mode. A restriction of natural language mode is " ... words that are present in 50% or more of the rows are considered common and do not match. Full-text searches are natural language searches if no modifier is given." And natural language is the default mode. This is documented in the Fulltext docs:

http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

If you switch your query to using Boolean mode:

SELECT * FROM test WHERE MATCH(a) AGAINST('databases' IN BOOLEAN MODE)

Then the two rows are returned.

Boolean mode has its own restrictions, one common one being that it does not return its rows in order of relevance. Overall, it does offer more features and flexibility than natural language mode, so you'll probably end up using it.

If your application is going to rely heavily on fulltext searching you might want to consider more full-featured packages such as Lucene/Solr or Sphinx

24
ответ дан 28 November 2019 в 18:04
поделиться
Другие вопросы по тегам:

Похожие вопросы: