使用AnalyzingInfixLookupFactory在apache solr中写入.lock问题

时间:2016-06-22 20:38:20

标签: apache solr lucene autosuggest search-suggestion

我在我们的应用程序中使用AnalyzingInfixLookupFactory进行自动建议功能。但是当我尝试使用自动建议功能并在一段时间后在文本框中搜索术语时会抛出write.lock错误。 下面是我在solr-config.xml文件中为suggestor / suggest组件配置的建议请求处理程序:

<searchComponent name="suggest" class="solr.SuggestComponent">
  <lst name="suggester">
    <str name="name">mySuggester</str>
    <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
    <str name="dictionaryImpl">DocumentDictionaryFactory</str>
    <str name="field">text</str>
    <str name="weightField">price</str>
    <str name="payloadField">prod_id</str>
    <str name="contextField">ancestors</str>  
    <str name="suggestAnalyzerFieldType">text_general</str>  
    <str name="buildOnStartup">false</str>
  </lst>
</searchComponent>

<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
  <lst name="defaults">
    <str name="suggest">true</str>
    <str name="suggest.count">10</str>
  </lst>
  <arr name="components">
    <str>suggest</str>
  </arr>
</requestHandler>

我有什么想法或解决方法可以绕过这个? 感谢。

1 个答案:

答案 0 :(得分:0)

AnalyzingInfixLookupFactory我遇到了同样的问题,转而AnalyzingLookupFactory为我修好了。