我正在运行Sitecore 8.2,并将配置从Lucene更新为Solr 我修改了自定义索引配置以支持Solr
下面将转换配置
<contentSearch>
<indexConfigurations>
<defaultSolrIndexConfiguration>
<mediaIndexing>
<mimeTypes>
<includes patch:instead="includes" />
</mimeTypes>
<extensions>
<includes patch:instead="includes" />
</extensions>
</mediaIndexing>
</defaultSolrIndexConfiguration>
<MyLibraryresponsiveSearchConfiguration
type="Sitecore.ContentSearch.SolrProvider.SolrIndexConfiguration, Sitecore.ContentSearch.SolrProvider">
<indexAllFields>true</indexAllFields>
<initializeOnAdd>false</initializeOnAdd>
<!--<analyzer ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/analyzer" />-->
<fieldMap ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap">
<fieldNames hint="raw:AddFieldByFieldName">
<field fieldName="hide in search" returnType="Bool" />
<field fieldName="publishing date" returnType="datetime">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="parsedlanguage" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="parsedupdatedby" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_templatename" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_datasource" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_database" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_uniqueid" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_indexname" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_creator" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_fullpath" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_language" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_id" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="__thumbnail" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="calculateddimension" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="sizerange" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="title" returnType="string" />
<field fieldName="text" returnType="string" />
<field fieldName="version" returnType="string" />
<field fieldName="urllink" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="__semantics" returnType="string" />
<field fieldName="_path" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="_group" returnType="Guid">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="site" returnType="string">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="__smallcreateddate" returnType="dateTime" />
<field fieldName="__smallupdateddate" returnType="datetime" />
<field fieldName="_latestversion" returnType="Bool" />
<field fieldName="isbucket_text" returnType="string" />
<field fieldName="_template" returnType="Guid">
<analyzer
type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<field fieldName="__workflow_state" returnType="Guid" />
<field fieldName="__hidden" returnType="Bool" />
</fieldNames>
</fieldMap>
<fieldReaders ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldReaders" />
<indexFieldStorageValueFormatter
ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/indexFieldStorageValueFormatter" />
<indexDocumentPropertyMapper
ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/indexDocumentPropertyMapper" />
<fields hint="raw:AddComputedIndexField">
<field fieldName="search_content" storageType="no" indexType="tokenized">MyLibrary.MyLibraryResponsive.Core.ContentSearch.ComputedFields.SearchContentField, MyLibrary.MyLibraryResponsive.Core</field>
<field fieldName="search_content" storageType="no" indexType="tokenized">MyLibrary.MyLibraryResponsive.Core.ContentSearch.ComputedFields.VisualizationField, MyLibrary.MyLibraryResponsive.Core</field>
<field fieldName="webinar session 1 time zone" storageType="YES" indexType="tokenized">MyLibrary.MyLibraryResponsive.Core.ContentSearch.ComputedFields.WebinarTimeZoneField, MyLibrary.MyLibraryResponsive.Core</field>
<field fieldName="webinar session 2 time zone" storageType="YES" indexType="tokenized">MyLibrary.MyLibraryResponsive.Core.ContentSearch.ComputedFields.WebinarTimeZoneField, MyLibrary.MyLibraryResponsive.Core</field>
<field fieldName="webinar session 1 date time" storageType="YES" indexType="tokenized">MyLibrary.MyLibraryResponsive.Core.ContentSearch.ComputedFields.WebinarDateTimeField, MyLibrary.MyLibraryResponsive.Core</field>
<field fieldName="webinar session 2 date time" storageType="YES" indexType="tokenized">MyLibrary.MyLibraryResponsive.Core.ContentSearch.ComputedFields.WebinarDateTimeField, MyLibrary.MyLibraryResponsive.Core</field>
<field fieldName="publishing year" storageType="YES" indexType="tokenized">MyLibrary.MyLibraryResponsive.Core.ContentSearch.ComputedFields.PublishingYearField, MyLibrary.MyLibraryResponsive.Core</field>
</fields>
</MyLibraryresponsiveSearchConfiguration>
</indexConfigurations>
</contentSearch>
现在我遇到错误了
工作开始: Index_Update_IndexName = radiometersensitive_RTUR |#例外: System.Reflection.TargetInvocationException:引发了异常 通过调用的目标。 -> SolrNet.Exceptions.SolrConnectionException:4002org.apache.solr.common.SolrExceptionorg.apache.solr.common.SolrExceptionundefined字段_indexname400 ---> System.Net.WebException: 远程服务器返回错误:(400)错误的请求。在 System.Net.HttpWebRequest.GetResponse()在 HttpWebAdapters.Adapters.HttpWebRequestAdapter.GetResponse()在 SolrNet.Impl.SolrConnection.GetResponse(IHttpWebRequest请求)位于 SolrNet.Impl.SolrConnection.PostStream(String relativeUrl,String contentType,流内容,IEnumerable
1 parameters) --- End of inner exception stack trace --- at SolrNet.Impl.SolrConnection.PostStream(String relativeUrl, String contentType, Stream content, IEnumerable
1个参数),位于 SolrNet.Impl.SolrConnection.Post(String relativeUrl,String s)在 SolrNet.Commands.DeleteCommand.Execute(ISolrConnection连接)
在SolrNet.Impl.SolrBasicServer`1.SendAndParseHeader(ISolrCommand cmd)处 在Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Reset()在 Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.PerformRebuild(Boolean resetIndex,布尔型optimizeOnComplete,IndexingOptions indexingOptions,CancelationToken cancelToken) Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Rebuild(Boolean resetIndex,布尔值optimizeOnComplete)-内部异常结束 堆栈跟踪---在System.RuntimeMethodHandle.InvokeMethod(Object 目标,Object []参数,签名sig,布尔构造函数)位于 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object []参数,Object []参数) System.Reflection.RuntimeMethodInfo.Invoke(对象obj,BindingFlags invokeAttr,活页夹活页夹,Object []参数,CultureInfo文化)
在Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo方法, Object []参数,Object obj)位于 Sitecore.Jobs.JobRunner.RunMethod(JobArgs args)位于(Object, 位于Sitecore.Pipelines.CorePipeline.Run(PipelineArgs的Object []) args)在Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName,PipelineArgs args,字符串pipelineDomain)位于 Sitecore.Jobs.Job.ThreadEntry(对象状态)