Full text search returns different results on test and live

天涯浪子 提交于 2019-12-24 06:03:11

问题


I will try to explain this issue as properly as I can. It's really weird in my mind, hopefully some of you guys have an idea of what might be wrong.

I have built a website with a search function, which uses full text search in MySQL, and searches in a table that is a dictionary.

I have set ft_min_word_len = 1 and ft_stopword_file = "" on both my test (windows xampp) and live (ubuntu 12.04) server.

Now, on my localhost test server if I search for example the word "hello", it returns around 20 entries from my dictionary. If I search for "hello" (same) on my live server, no results get returned.

However, if I search for example the word "kyuu" (japanese word) on my test server, I get around 50 results. On my live server I get 2 results.

So this means that it does search and it does return some results sometimes. There's just something very weird with the result it grabs on the live server.

Any ideas? It seems almost as if the live server only searches a part of the table or something? Or it runs out of memory and quits in the middle of the search or something? I don't know...

Thank you in advance.


回答1:


Not an answer but suggestion:

do u have the exact indexes and table setup on the live server? Even a variation in encoding can throw it off.. Maybe you should run the table repair quick option

MySql Repair Table



来源:https://stackoverflow.com/questions/23192082/full-text-search-returns-different-results-on-test-and-live

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!