Sitecore 7.2中的计算字段奇怪的行为

时间:2016-05-19 11:38:00

标签: lucene sitecore computed-field

我已经构建了几个计算字段并且它工作正常,但在我重构了我的代码和结构之后,不同的计算字段表现出奇怪的行为。

一个工作,让我在断点处暂停代码,另一个不工作。

代码看起来相同,索引配置相同,除了我在重构后更改了程序集和命名空间的值之外没有其他任何更改。

<fieldMap ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration/fieldMap">
            <fieldNames hint="raw:AddFieldByFieldName">
              <field fieldName="DateStart" storageType="YES" indexType="UNTOKENIZED" vectorType="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
              <field fieldName="DateEnd" storageType="YES" indexType="UNTOKENIZED" vectorType="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
              <field fieldName="Appetizer" storageType="YES" indexType="TOKENIZED" vectorType="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
              <field fieldName="Title" storageType="YES" indexType="TOKENIZED" vectorType="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
              <field fieldName="ApplicationDeadline" storageType="YES" indexType="TOKENIZED" vectorType="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
              <field fieldName="Location" storageType="YES" indexType="TOKENIZED" vectorType="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
              <field fieldName="Engagement" storageType="YES" indexType="TOKENIZED" vectorType="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
              <field fieldName="computedCountries" storageType="YES" indexType="UNTOKENIZED" vectorType="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
                <Analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
              </field>
              <field fieldName="computedMarkets" storageType="YES" indexType="UNTOKENIZED" vectorType="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
                <Analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
              </field>
            </fieldNames>
          </fieldMap>

          <fields hint="raw:AddComputedIndexField">
            <field fieldName="computedMarkets">Ram.SC.ContentSearch.ComputedFields.MarketComputedField, Ram.SC.ContentSearch</field>
            <field fieldName="computedCountries">Ram.SC.ContentSearch.ComputedFields.CountryComputedField, Ram.SC.ContentSearch</field>
          </fields>

所以我无法弄清楚骨头埋在哪里。

我希望你能帮帮我:)。

/罗宾

1 个答案:

答案 0 :(得分:0)

感谢您的评论。

最后,它是框架版本之间的不一致,我只是通过查看crawling.log文件找到它。

/罗宾