2016-10-14 4 views
0

私はsolr 6.2を使用しています。私は、Solr検索コンポーネントで複数の提案者の定義を設定しようとすると、同様にエラー情報を得ています:Solrからの無効な参照で例外を取得するDocumentExpressionDictionaryFactory

java.lang.IllegalArgumentException: Invalid reference 'softId_suggest' 
at org.apache.lucene.expressions.SimpleBindings.getValueSource(SimpleBindings.java:84) 
at org.apache.lucene.expressions.ExpressionValueSource.<init>(ExpressionValueSource.java:45) 
at org.apache.lucene.expressions.Expression.getValueSource(Expression.java:80) 
at org.apache.solr.spelling.suggest.DocumentExpressionDictionaryFactory.fromExpression(DocumentExpressionDictionaryFactory.java:107) 
at org.apache.solr.spelling.suggest.DocumentExpressionDictionaryFactory.create(DocumentExpressionDictionaryFactory.java:92) 
at org.apache.solr.spelling.suggest.SolrSuggester.build(SolrSuggester.java:174) 
at org.apache.solr.handler.component.SuggestComponent$SuggesterListener.buildSuggesterIndex(SuggestComponent.java:528) 
at org.apache.solr.handler.component.SuggestComponent$SuggesterListener.newSearcher(SuggestComponent.java:508) 
at org.apache.solr.core.SolrCore.lambda$3(SolrCore.java:1863) 
at java.util.concurrent.FutureTask.run(Unknown Source) 
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
at java.lang.Thread.run(Unknown Source) 

と私のSolrconfig.xmlで設定は以下のとおりですから

<field name="softId_suggest" type="int" indexed="true" stored="true" /> 
<copyField source="softId" dest="softId_suggest" /> 

<lst name="suggester"> 
    <str name="name">MySuggest</str> 
    <str name="lookupImpl">AnalyzingInfixLookupFactory</str> 
    <str name="dictionaryImpl">DocumentExpressionDictionaryFactory</str> 
    <str name="field">suggest_name</str> 
    <str name="highlight">false</str> 
    <str name="weightExpression">softId_suggest</str>  
    <str name="indexPath">analyzingInfixSuggesterIndexDir</str> 
    <str name="suggestAnalyzerFieldType">text_suggest</str> 
</lst> 

luceneのソース私はフィールドsoftId_suggestがnullであるように見えることを知っていますが、正しく設定するにはどうすればいいですか?

答えて

0

あなたの説明では、softld_suggestをsolrconfig.xmlに設定したとします。ただし、フィールドはの管理スキーマに設定されています。だから、どちらかが問題であるか、あなたはその質問を修正する必要があります。

正しく定義されている場合は、コアを再ロードして、インポートを再実行してコミットしていることを確認してください。

次に、管理UIのスキーマページをチェックして、フィールドがドロップダウンに存在し、いくつかの値がロードされていることを確認します(Load Term Infoボタン)。

+0

ご返信ありがとうございます。 – zhaosting

+0

設定ファイルで質問を修正しました。「softid_suggest」フィールドが管理UIの「スキーマ」ページに表示されていますが、tomcatサーバーを再起動しようとするとエラー情報が表示されることがあります。 – zhaosting

+0

最小限の変更で株式Solr設定に対してこれを試すことができます。 Solcat 6.2ではサポートされていないtomcatサーバーについて話しています。たぶん展開の問題があるかもしれません。 –