全文搜索在测试和现场中返回不同的结果 [英] Full text search returns different results on test and live

查看:186
本文介绍了全文搜索在测试和现场中返回不同的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会尽我所能地解释这个问题。在我看来,这真的很奇怪,希望你们中的一些人知道什么可能是错的。



我建立了一个网站,其中使用了搜索功能,它使用全文在MySQL中搜索,并在字典表中搜索。



我已经设置了 ft_min_word_len = 1 ft_stopword_file =在我的测试(windows xampp)和live(ubuntu 12.04)服务器上。

我的本地主机测试服务器,如果我搜索例如单词你好,它会返回大约20个词条。如果我在我的实时服务器上搜索hello(相同),则不会返回任何结果。然而,如果我搜索例如单词kyuu(日语单词)在我的测试服务器上,我得到了大约50个结果。在我的实时服务器上,我得到了2个结果。



所以这意味着它会搜索并且它有时会返回一些结果。这只是一个非常奇怪的结果,它抓住了现场服务器。



任何想法?看起来好像现场服务器只搜索表格的某个部分或其他东西?或者它耗尽内存并在搜索中途退出?我不知道...

提前感谢您。

解决方案

不是一个答案,而是一个建议:

在活动服务器上有确切的索引和表格设置吗?即使在编码方面的变化也可能导致它失败。也许你应该运行表修复快捷选项



MySql修复表格


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.

解决方案

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

这篇关于全文搜索在测试和现场中返回不同的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆