Sitecore _path 字段 returns Solr 索引中的 NULL

Sitecore _path field returns NULL in Solr index

我正在为 Sitecore 使用 Solr 索引。

但是,对于 _path 字段,搜索结果总是返回 null。

它正在研究 Lucene。 Solr 是否需要特殊对待?

下面是玻璃映射器属性:

[IndexField("_path"), TypeConverter(typeof(IndexFieldEnumerableConverter))]
        [SitecoreIgnore]
        public virtual System.Collections.Generic.IEnumerable<ID> EntityPath { get; set; }

并且 SOLR 模式具有以下条目:

<field name="_path" type="string" indexed="true" stored="false" multiValued="true" />

将您的 "store" 设置更改为 true:

<field name="_path" type="string" indexed="true" stored="true" multiValued="true" />

存储属性将确保您的原始值保留在索引中以供检索。否则您可以在该字段中搜索,但不能获取它。