我正在使用SolR雲6.5.0安裝。 我的目標是檢索與我的搜索字詞共同出現的所有字詞,按數字對它們進行排名,並取得前N個字詞。 要做到這一點,我已經定義了一個text_en_facets
類型的字段,它定義了一個帶有PatternTokenizer
的文本字段以及其他一些內容(文章最後的完整定義)。SolR:在TextField上刻面
現在我的實例包含相當長的一段數據:該字段包含1.3M獨特的術語和,結果,我得到以下錯誤:
o.a.s.s.FastLRUCache Error during auto-warming of key:payload_en_facets:org.apache.solr.common.SolrException: java.lang.IllegalStateException: Too many values for UnInvertedField faceting on field…
我注意到,other people had the same issue,如果有任何我想知道有關最佳做法的新聞和/或繞過這一限制的方法。 如果我不需要重新索引數據或手動分析我的文檔以使用StrField
s,那將會非常棒。
我已經嘗試了facet.method
,facet.limit
和facet.mincount
的不同配置,但這並未解決問題。 有沒有其他想法?
<fieldType name="text_en_facets" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<!-- recognises e-mail addresses, urls, #-tags and @-mentions, alphanumeric words (possibly containing inner periods) -->
<tokenizer class="solr.PatternTokenizerFactory"
pattern="(?U)([\w-\.][email protected][\w-\.]+)|(https?:\S+)|((\s|^)[@#]\w+)|(\w+(\.\w+)?)" group="0"/>
<!-- there might be tokens containing trailing/leading white spaces -->
<filter class="solr.TrimFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StopFilterFactory" format="snowball"
words="stopwords/stopwords_en.txt,stopwords/stopwords_en_nltk.txt,stopwords/stopwords_en_twitter.txt"
ignoreCase="true"/>
<!-- kills urls -->
<filter class="solr.PatternReplaceFilterFactory" pattern="(?U)https?:\S+" replacement=""/>
<!-- kills numbers -->
<filter class="solr.PatternReplaceFilterFactory" pattern="(?U)^[0-9.,']+$" replacement=""/>
<!-- kills meaningless tokens -->
<filter class="solr.LengthFilterFactory" min="2" max="1024"/>
</analyzer>
</fieldType>
您是否從答案中嘗試了補丁? – MatsLindh
hi @MatsLindh,還不是 – Alberto