简体   繁体   English

Sitecore solr和muiltilist搜索

[英]Sitecore solr and muiltilist with search

I've set up a new instance of Sitecore, added some items and created a multilist with search, all works fine until I move to solr. 我已经设置了Sitecore的新实例,添加了一些项目并创建了一个带有搜索的多列表,所有工作都正常,直到我转向solr。

After enabled debug on search I've got that Sitecore is sending to solr the following query 在搜索启用调试后,我发现Sitecore正在发送以解决以下查询

((-_group:(d4882314400a467fad6f84bbb58acd03) -_group:(15fbfc2f4af34e0dbdf0a094332127bb)) AND _templatename:(Ship))

The problem is that query doesn't return anything in solr the correct query should be 问题是查询不会在solr中返回正确的查询应该是什么

(-_group:(d4882314400a467fad6f84bbb58acd03) -_group:(15fbfc2f4af34e0dbdf0a094332127bb) AND _templatename:(Ship))

But I'm finding hard to accept that Sitecore just doesn't work with solr and multilist with search. 但我发现很难接受Sitecore只是不能与solr和多列表一起使用搜索。

Any ideas? 有任何想法吗?

Looks like a bug and worth raising with Sitecore Support. 看起来像一个错误,值得提升Sitecore支持。

There are a number of known issues with Multilist with search. Multilist与搜索有许多已知问题。

Take a look at this knowledge base article to see if the solution works for you: 请查看此知识库文章,了解该解决方案是否适合您:

https://kb.sitecore.net/articles/372032 https://kb.sitecore.net/articles/372032

You needs to create a custom index for multi-list. 您需要为多列表创建自定义索引。

public class SearchCategoryComputedField : IComputedIndexField
    {
        public string FieldName { get; set; }
        public string ReturnType { get; set; }

        public object ComputeFieldValue(IIndexable indexable)
        {
            string multilistValues="";
            //Write logic here to get your selected values of multi list
            return multilistValues;
        }

Also add path config for custom index, then rebuilt your index. 还为自定义索引添加路径配置,然后重建索引。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM