After upgrade to Coveo 4.0 I am getting an error related to the version field. Here is the query I am running in Linq Scratch Pad:
using (var context = ContentSearchManager.GetIndex("Coveo_web_index").CreateSearchContext())
{
return context.GetQueryable<SearchResultItem>().Take(10).ToList();
}
As you can see the query itself is no magic, I did not change it.
The Searchprovider.config by default has:
<fields hint="raw:AddComputedIndexField">
<field fieldName="calculateddimension">Sitecore.ContentSearch.ComputedFields.CalculatedDimension,Sitecore.ContentSearch</field>
<field fieldName="istemplate">Sitecore.ContentSearch.ComputedFields.IsTemplate,Sitecore.ContentSearch</field>
<field fieldName="haschildren">Sitecore.ContentSearch.ComputedFields.HasChildren,Sitecore.ContentSearch</field>
<field fieldName="lock">Sitecore.ContentSearch.ComputedFields.IsLocked,Sitecore.ContentSearch</field>
<field fieldName="parsedcreatedby">Sitecore.ContentSearch.ComputedFields.ParsedCreatedBy,Sitecore.ContentSearch</field>
<field fieldName="parsedupdatedby">Sitecore.ContentSearch.ComputedFields.ParsedUpdatedBy,Sitecore.ContentSearch</field>
<field fieldName="parsedlanguage">Sitecore.ContentSearch.ComputedFields.ParsedLanguage,Sitecore.ContentSearch</field>
<field fieldName="site">Sitecore.ContentSearch.ComputedFields.Site,Sitecore.ContentSearch</field>
<field fieldName="sizerange">Sitecore.ContentSearch.ComputedFields.FileSizeGrouping,Sitecore.ContentSearch</field>
<field fieldName="version">Sitecore.ContentSearch.ComputedFields.StoreVersionTermVector,Sitecore.ContentSearch</field>
<field fieldName="urllink">Sitecore.ContentSearch.ComputedFields.UrlLink,Sitecore.ContentSearch</field>
<field fieldName="isbucket_text">Sitecore.ContentSearch.ComputedFields.IsBucket,Sitecore.ContentSearch</field>
<field fieldName="alltemplates">Sitecore.ContentSearch.ComputedFields.AllTemplates, Sitecore.ContentSearch</field>
</fields>
And in the index I can see the version field. @fversion24653 String 1
I get the error:
Property accessor 'Version' on object 'Sitecore.ContentSearch.SearchTypes.SearchResultItem' threw the following exception:'The given key was not present in the dictionary.'
I have index all fields as true.
<coveoQueryFieldPipeline patch:source="Coveo.SearchProvider.config">
<processor type="Coveo.SearchProvider.Processors.Queries.AddAllFieldsProcessor, Coveo.SearchProviderBase"/>
</coveoQueryFieldPipeline>
The base Coveo.SearchProvider.config indexes version, id and unique id fields.
<fieldType fieldName="_id" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" type="Sitecore.Data.ID, Sitecore.Kernel" returnType="System.String" />
<fieldType fieldName="_uniqueid" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" type="Sitecore.Data.ItemUri, Sitecore.Kernel" returnType="System.String" />
<fieldType fieldName="name" isFacet="true" isSortable="true" includeForFreeTextSearch="true" isMultiValue="false" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" />
<fields hint="raw:AddComputedIndexField">
<field fieldName="calculateddimension">Sitecore.ContentSearch.ComputedFields.CalculatedDimension,Sitecore.ContentSearch</field>
<field fieldName="istemplate">Sitecore.ContentSearch.ComputedFields.IsTemplate,Sitecore.ContentSearch</field>
<field fieldName="haschildren">Sitecore.ContentSearch.ComputedFields.HasChildren,Sitecore.ContentSearch</field>
<field fieldName="lock">Sitecore.ContentSearch.ComputedFields.IsLocked,Sitecore.ContentSearch</field>
<field fieldName="parsedcreatedby">Sitecore.ContentSearch.ComputedFields.ParsedCreatedBy,Sitecore.ContentSearch</field>
<field fieldName="parsedupdatedby">Sitecore.ContentSearch.ComputedFields.ParsedUpdatedBy,Sitecore.ContentSearch</field>
<field fieldName="parsedlanguage">Sitecore.ContentSearch.ComputedFields.ParsedLanguage,Sitecore.ContentSearch</field>
<field fieldName="site">Sitecore.ContentSearch.ComputedFields.Site,Sitecore.ContentSearch</field>
<field fieldName="sizerange">Sitecore.ContentSearch.ComputedFields.FileSizeGrouping,Sitecore.ContentSearch</field>
<field fieldName="version">Sitecore.ContentSearch.ComputedFields.StoreVersionTermVector,Sitecore.ContentSearch</field>
<field fieldName="urllink">Sitecore.ContentSearch.ComputedFields.UrlLink,Sitecore.ContentSearch</field>
<field fieldName="isbucket_text">Sitecore.ContentSearch.ComputedFields.IsBucket,Sitecore.ContentSearch</field>
<field fieldName="alltemplates">Sitecore.ContentSearch.ComputedFields.AllTemplates, Sitecore.ContentSearch</field>
</fields>
EDIT #1:
Also seeing the following error:
46984 13:14:44 WARN The current item could not be processed by the field processor Sitecore.ContentSearch.VirtualFields.LatestVersionFieldProcessor.
Exception: System.Collections.Generic.KeyNotFoundException
Message: The given key was not present in the dictionary.
Source: mscorlib
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Sitecore.ContentSearch.VirtualFields.LatestVersionFieldProcessor.TranslateFieldResult(IDictionary`2 fields, FieldNameTranslator fieldNameTranslator)
at Coveo.SearchProvider.CoveoDocumentTypeMapper.ReadDocumentFields[TElement](QueryResult p_Document, IEnumerable`1 p_FieldNames, DocumentTypeMapInfo p_DocumentTypeMapInfo, IEnumerable`1 p_VirtualFieldProcessors, TElement p_Resul