如何在Solr配置中设置最大字符串长度

时间:2016-05-10 09:39:58

标签: solr solrj solr5

在使用SolrJ进行索引时,我能够发现,我的一个数据无法索引。因为数据(String)的长度超过20000。 用我的谷歌搜索,用于长度(在Solr 4.x之前),它现在用于。因此我只是把它应用到了我的Solr,但它仍然没有用。

如果有人知道,如何在Solr5中增加字符串长度。请给我你的意见。

下面的sudo代码是我的Schema部分。

<field name ="description" type="text_general" indexed="true" stored="false" required="false" />

<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">

<analyzer type="index">
<tokenizer class= " ..." />
<filter class= ".. " />
...
<filter class="solr.LimitTokenCountFilterFactory" maxToeknCount="100000" />
</analyzer>

 <analyzer type ="query">
   ...
   ...
  <filter class="solr.LimitTokenCountFilterFactory" maxToeknCount="100000" />

1 个答案:

答案 0 :(得分:1)

请注意拼写错误的参数maxToeknCount。正确的应该是maxTokenCount,这可能是你问题的根源。

无论如何,我不明白你为什么要尝试扩展LimitTokenCountFilterFactory限制来删除它。 从LimitTokenCountFilterFactoryindex分析器中删除过滤器query可以解决问题。