在delete
中执行Solr
时,它会一直失败。承诺新的仍然有效。我一直没有找到为什么会发生这种情况,不同的文件/不同的条目似乎没有什么区别。
solr
日志不断给出错误:
NumberFormatException: For input string: "", with different strings, though all the same length and all starting with 14.
这是怎么回事?这个字符串来自哪里?
堆栈追踪:
auto commit error...:java.lang.NumberFormatException: For input string: "1480184563863912448"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:495)
at java.lang.Integer.parseInt(Integer.java:527)
at org.apache.lucene.queries.function.docvalues.IntDocValues.getRangeScorer(IntDocValues.java:97)
at org.apache.solr.search.function.ValueSourceRangeFilter$1.iterator(ValueSourceRangeFilter.java:81)
at org.apache.solr.search.SolrConstantScoreQuery$ConstantScorer.<init>(SolrConstantScoreQuery.java:165)
at org.apache.solr.search.SolrConstantScoreQuery$ConstantWeight.scorer(SolrConstantScoreQuery.java:123)
at org.apache.lucene.search.BooleanQuery$BooleanWeight.scorer(BooleanQuery.java:356)
at org.apache.lucene.search.QueryWrapperFilter$1.iterator(QueryWrapperFilter.java:59)
at org.apache.lucene.index.BufferedUpdatesStream.applyQueryDeletes(BufferedUpdatesStream.java:554)
at org.apache.lucene.index.BufferedUpdatesStream.applyDeletesAndUpdates(BufferedUpdatesStream.java:287)
at org.apache.lucene.index.IndexWriter.applyAllDeletesAndUpdates(IndexWriter.java:3268)
at org.apache.lucene.index.IndexWriter.maybeApplyDeletes(IndexWriter.java:3259)
at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:2973)
at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3122)
at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3089)
at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:582)
at org.apache.solr.update.CommitTracker.run(CommitTracker.java:216)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Schem.xml字段config
<fields>
<field name="_version_" type="int" indexed="true" />
<field name="id" type="string" indexed="true" stored="true" required="true" />
<field name="content_nl" type="testedgengrams" indexed="true" stored="true" />
<field name="title_nl" type="testedgengrams" indexed="true" stored="true" />
<field name="title_h1_nl" type="testedgengrams" indexed="true" stored="true" />
<field name="root_id" type="int" indexed="true" stored="true" />
<field name="text" type="testedgengrams" indexed="true" stored="true" />
<field name="ondertitel" type="testedgengrams" indexed="true" stored="true" />
<field name="programma" type="testedgengrams" indexed="true" stored="true" />
<field name="documenttype" type="testedgengrams" indexed="true" stored="true" />
<field name="jaar" type="string" indexed="true" stored="true" />
<field name="file" type="testedgengrams" indexed="true" stored="true" />
<field name="meta_description_nl" type="testedgengrams" indexed="true" stored="true"/>
<field name="published_start" type="date" indexed="true" stored="true" />
<field name="published_end" type="date" indexed="true" stored="true" />
<field name="trefwoord" type="testedgengrams" indexed="true" stored="true" multiValue
<field name="auteur" type="testedgengrams" indexed="true" stored="true" multiVa
<field name="opdrachtgever" type="testedgengrams" indexed="true" stored="true"
<field name="alltext" type="testedgengrams" indexed="true" stored="true" multiV
<field name="programma_filter" type="keyword" indexed="true" stored="true" />
<field name="documenttype_filter" type="keyword" indexed="true" stored="true" /
<field name="trefwoord_filter" type="keyword" indexed="true" stored="true" mult
<field name="auteur_filter" type="keyword" indexed="true" stored="true" multiVa
<field name="opdrachtgever_filter" type="keyword" indexed="true" stored="true"
</fields>
<uniqueKey>id</uniqueKey>
<defaultSearchField>title_nl</defaultSearchField>
<solrQueryParser defaultOperator="OR"/>
<copyField source="*" dest="alltext"/>
<copyField source="programma" dest="programma_filter"/>
<copyField source="documenttype" dest="documenttype_filter"/>
<copyField source="trefwoord" dest="trefwoord_filter"/>
<copyField source="auteur" dest="auteur_filter"/>
<copyField source="opdrachtgever" dest="opdrachtgever_filter"/>
答案 0 :(得分:1)
在你的字段定义中你有这个:
<field name="_version_" type="int" indexed="true" />
版本字段应为long
而不是int
,因为版本可能会变得非常大。尝试将其更改为
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
请务必清理数据文件夹并执行干净的导入