我正在开发一个基于Sitecore 8.0 rev的新网站。 150223我正在尝试安装Solr 6.2.0.0。我主要按照这里的说明进行操作:https://born4joy.wordpress.com/2015/09/03/installation-and-configuration-of-solr-for-sitecore-8/(我是这个过程的新手和Sitecore本身)
我已完成说明中的步骤,但我收到以下服务器错误。我在谷歌搜索这个问题时找不到任何类似的例子。
Server Error in '/' Application.
Field type 'alphaOnlySort' not found
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: SolrNet.Exceptions.SolrNetException: Field type 'alphaOnlySort' not found
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SolrNetException: Field type 'alphaOnlySort' not found]
SolrNet.Schema.SolrSchemaParser.Parse(XDocument solrSchemaXml) +1091
Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Initialize() +914
Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.Initialize() +169
[HttpException (0x80004005): Field type 'alphaOnlySort' not found]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +544
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +186
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343
[HttpException (0x80004005): Field type 'alphaOnlySort' not found]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +716
答案 0 :(得分:1)
看起来你缺少alphaOnlySort的fieldType。尝试将以下定义添加到 schema.xml 文件
<fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
<analyzer>
<!-- KeywordTokenizer does no actual tokenizing, so the entire
input string is preserved as a single token
-->
<tokenizer class="solr.KeywordTokenizerFactory" />
<!-- The LowerCase TokenFilter does what you expect, which can be
when you want your sorting to be case insensitive
-->
<filter class="solr.LowerCaseFilterFactory" />
<!-- The TrimFilter removes any leading or trailing whitespace -->
<filter class="solr.TrimFilterFactory" />
<!-- The PatternReplaceFilter gives you the flexibility to use
Java Regular expression to replace any sequence of characters
matching a pattern with an arbitrary replacement string,
which may include back references to portions of the original
string matched by the pattern.
See the Java Regular Expression documentation for more
information on pattern and replacement string syntax.
http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html
-->
<filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])" replacement="" replace="all" />
</analyzer>
</fieldType>