开发者

Magento SOLR doesn't return results

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

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.

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

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


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

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

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.

What happened?

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.


*:* 

would work as its matching all on all fields.

Search for maria mosters is going to search in the default field, if you are using the standard request handler.
The default search field set in the schema is fulltext and I don't see any copyfields into it. So are you sure the field is populated.

If you are using any custom request handler via the qt param, are the proper fields included in it ?

sharing you solrconfig and full query might help for others to help you further.


Looks like your issue is that in your schema, you have the fulltext field defined as the default search field, but you are not populating that field. I would recommend either setting the default field to another field that you are populating or when you execute your query, specify the field that you want to search against... Example text_en:"maria monsters"

Please also see the SolrQuerySyntax page on the Solr Wiki for more details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜