Skip to main content
1 of 2

Migrate sitecore 8.1 from lucene to Solr 5.x issue

I am trying to swap lucene with solr in our project (I use this cool guide How to switch Lucene to Solr) But I faced an issue. All except these two fields work fine.

Part of Lucene's config.

  <field fieldName="my_project_name" storageType="YES" indexType="TOKENIZED" vectorType="WITH_POSITIONS_OFFSETS" boost="1f" emptyString="_EMPTY_" nullValue="_NULL_" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
          <Analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider"/>
  </field>
             
  <field fieldName="my_project_type_name" storageType="YES" indexType="TOKENIZED" vectorType="WITH_POSITIONS_OFFSETS" boost="1f" emptyString="_EMPTY_" nullValue="_NULL_" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
        <Analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider"/>
  </field>

Part of Solr Config

<field fieldName="my_project_type_name" termVectors="true"   termPositions="true" termOffsets="true">ComputedFields.ProjectTypeNameField, Business</field>
<field fieldName="my_project_name" termVectors="true" termPositions="true" termOffsets="true">ComputedFields.ProjectNameField, Business</field>

According to solr docs I have to add relevant handler https://lucene.apache.org/solr/guide/6_6/the-term-vector-component.html

  • it doesn't work. Also I have tried use PostingsHighlighter with this storeOffsetWithPOsitions - the same result.

The answer is - is there any chance that sitecore support this solr feature? If so what I did in the wrong way? Can it be implement in the other way?