Magento SOLR不返回结果 [英] Magento SOLR doesn't return results

查看:108
本文介绍了Magento SOLR不返回结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将SOLR与Magento集成到我的开发机器上.我们正在升级Magento,我想测试SOLR是否也能正常工作.

I am trying to integrate SOLR with Magento on my development machine. We are upgrading Magento and I want to test if SOLR is working as well.

我有能力喂SOLR,据统计它有文件.在SOLR管理员中,当我将:用作查询字符串时,我确实获得了文档列表.但是,例如,当我搜索大多数疟疾"时,不会返回任何结果.

I am able to feed SOLR, the stats say that it has documents. In SOLR admin, when I put in : as query string, I do get the list of documents. But when I search for "maria mosters" for example, no results are returned.

我已经尝试过SOLR 1.4.1(我们在生产环境中运行)和3.4.0.

I have tried SOLR 1.4.1 (which we run in production) and 3.4.0.

我的schema.xml: http://pastebin.com/3a2J99re

My schema.xml: http://pastebin.com/3a2J99re

推荐答案

感谢您的答复.对于我的情况,我终于得到了答案.

Thank you for your replies. I finally got my answer, for my case.

我通过检查SOLR正在记录的查询字符串发现了.例如:

I found out by checking the query string that was being logged by SOLR. This was for example:

127.0.0.1 - - [28/09/2011:09:05:34 +0000] "GET /solr/select?sort=score+desc&fl=id&spellcheck=true&spellcheck.count=2&qt=magento_nl&spellcheck.collate=true&spellcheck.dictionary=magento_spell_nl&spellcheck.extendedResults=true&fq=visibility%3A4+AND+store_id%3A1&version=1.2&wt=json&json.nl=map&q=%28maria+mosterd%29&start=0&rows=1 HTTP/1.0" 400 1405

当我第一次请求此查询时,它表示字段可见性未知.显然,此字段是Magento在升级版本中添加的.我将字段添加到配置中,然后再次运行查询.现在它说字典magento_spell_nl不存在.

When I requested this query the first time, it said that the field visibility was unknown. Apparently this field was added by Magento in the upgraded release. I added the field to the config, and ran the query again. Now it said that the dictionairy magento_spell_nl did not exist.

发生了什么事?

新的Magento有一个名为启用搜索建议"的选项.在我以前的Magento版本中,此选项不存在,因此该拼写检查程序未传递给查询字符串.

The new Magento has a option called "Enable Search Suggestions". In my previous Magento version, this option didn't exist, so this spellchecker thing was not passed to the query string.

启用此设置后,我便可以使用生产服务器的确切副本.

When I turned this setting of, I was able to use my exact copy of the production server.

这篇关于Magento SOLR不返回结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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