任何想法或建议.我有点困惑,我有几次设置solr和magento但现在使用magento 1.12它表现得很奇怪没有正确的结果而且没有拼写检查.
我们的magento 1.11使用solr 1.4正常工作,它仍然工作正常我尝试使用1.4和solr 3.6没有修复.
任何想法或建议.我有点困惑
我们在使用Magento EE 1.12的solr中发现了多个问题.
如果您通过cronjob从shell运行全文索引器,则会发生以下事件(是的拼写不正确)"catelogsearch_searchable_attributes_load_after"将不会被分派,并且不会运行此方法:storeSearchableAttributes.这会阻止在Solr文档中发送所有全文属性.解决方案是从GUI运行它但是你必须在.htaccess中扩展你的php超时,并且可能还会扩展php内存限制.我可能会在某处硬编码,因为你显然不希望你的网站访问者有这么长的超时.
我建议在magento admin gui中启用"部分提交".
运行此索引器时,请注意solr日志.它提供了有价值的线索.我们有两个问题导致solr严重错误.一个"*"被错误地转义为"\*"的地方.我们通过从我们检查的核心创建本地覆盖来覆盖它!=="*":app/code/local/Enterprise/Search/Model/Adapter/Solr/Abstract.php
foreach ($facetFieldConditions as $facetCondition) {
if (is_array($facetCondition) && isset($facetCondition['from'])
&& isset($facetCondition['to'])) {
$from = (isset($facetCondition['from']) && strlen(trim($facetCondition['from'])) && trim($facetCondition['from']) !== "*")
? $this->_prepareQueryText($facetCondition['from'])
: '*';
$to = (isset($facetCondition['to']) && strlen(trim($facetCondition['to'])) && trim($facetCondition['to']) !== "*")
Run Code Online (Sandbox Code Playgroud)我们还有一个案例,其中设置为multiselect的属性可能没有选择任何选项.当数组为空时,很长一段时间会导致输入一个空字符串,这会引发错误.解决方案是首先检查阵列是否为空.所以我们必须覆盖app/code/local/Enterprise/Search/Model/Adapter/Abstract.php
if (!empty($val)) {
$preparedValue = array_merge($preparedValue, explode(',', $val));
}
| 归档时间: |
|
| 查看次数: |
2110 次 |
| 最近记录: |