You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Lance Norskog <go...@gmail.com> on 2008/01/21 21:04:35 UTC

Help - corrupted field in index

I have an 'integer' static field in my schema. Some the index for this field
is corrupted. When I search on this field it works. When I use this field to
sort against, I get this exception. Does this mean that there is a string in
one of my entries? It is possible the field was not required or defaulted at
some point and there are empty indexed fields for some records.
 
description The server encountered an internal error (For input string: ""
java.lang.NumberFormatException: For input string: "" at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48
) at java.lang.Integer.parseInt(Integer.java:468) at
java.lang.Integer.parseInt(Integer.java:497) at
org.apache.lucene.search.FieldCacheImpl$1.parseInt(FieldCacheImpl.java:136)
at
org.apache.lucene.search.FieldCacheImpl$3.createValue(FieldCacheImpl.java:17
1) at
org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:72) at
org.apache.lucene.search.FieldCacheImpl.getInts(FieldCacheImpl.java:154) at
org.apache.lucene.search.FieldCacheImpl.getInts(FieldCacheImpl.java:148) at
org.apache.lucene.search.FieldSortedHitQueue.comparatorInt(FieldSortedHitQue
ue.java:204) at
org.apache.lucene.search.FieldSortedHitQueue$1.createValue(FieldSortedHitQue
ue.java:175) at
org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:72) at
org.apache.lucene.search.FieldSortedHitQueue.getCachedComparator(FieldSorted
HitQueue.java:155) at
org.apache.lucene.search.FieldSortedHitQueue.<init>(FieldSortedHitQueue.java
:56) at
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java
:856) at
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:
805) at
org.apache.solr.search.SolrIndexSearcher.getDocList(SolrIndexSearcher.java:6
98) at
org.apache.solr.request.StandardRequestHandler.handleRequestBody(StandardReq
uestHandler.java:122) at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.
java:77) at org.apache.solr.core.SolrCore.execute(SolrCore.java:658) at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:1
91) at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:
159) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:215) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:188) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:210) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:174) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127
) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:108) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:665) at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:528) at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:81) at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:685) at java.lang.Thread.run(Thread.java:595) ) that prevented it from
fulfilling this request.

  _____  


A


Re: Help - corrupted field in index

Posted by Chris Hostetter <ho...@fucit.org>.
: I have an 'integer' static field in my schema. Some the index for this field
: is corrupted. When I search on this field it works. When I use this field to
: sort against, I get this exception. Does this mean that there is a string in
: one of my entries? It is possible the field was not required or defaulted at
: some point and there are empty indexed fields for some records.

i believe this means that at some point, someone indexed the empty string 
"" in your index, ie: assuming you use the XmlUpdateRequestHandler, 
then one of these was indexed......

      <field name="yourFieldName"></field>
 or:  <field name="yourFieldName"/>

..if a document was indexed without ever refering to yourFieldName you 
shouldn't see this.)

I believe (but i'm not positive) this relates to this issue...

	http://issues.apache.org/jira/browse/SOLR-424

...i think the root cause in both cases is that the "integer" type doesn't 
reject a value of "" even tough it is not a valid integer (so it causes 
problems like this later)


-Hoss