lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siraj Haider <si...@jobdiva.com>
Subject Re: Exception when running search
Date Fri, 18 Jun 2010 14:24:09 GMT
I knew I was doing something stupid and a simple statement that you made 
urged me to check and the problem was, the n was passed as 0.  Thanks a 
lot Uwe.  On a side note, It would be better to see more readable 
exception instead of a ArrayIndexOutofBound.  Thanks alot for your help.

-siraj


On 6/18/2010 10:12 AM, Uwe Schindler wrote:
> Whats the code you use for search? What is n, what type of fields?
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
>    
>> -----Original Message-----
>> From: Siraj Haider [mailto:siraj@jobdiva.com]
>> Sent: Friday, June 18, 2010 4:06 PM
>> To: java-user@lucene.apache.org
>> Subject: Fwd: Exception when running search
>>
>> Just wanted to mention that I am using Lucene 2.9.2 if it helps.
>>
>> thanks
>> -siraj
>>
>> -------- Original Message --------
>> Subject: 	Exception when running search
>> Date: 	Thu, 17 Jun 2010 13:06:04 -0400
>> From: 	Siraj Haider<siraj@jobdiva.com>
>> Reply-To: 	java-user@lucene.apache.org<java-
>> user@lucene.apache.org>
>> To: 	java-user@lucene.apache.org<java-user@lucene.apache.org>
>>
>>
>>
>> I am trying to run a search using search(query, filter, n, sort) method
>>      
> which
>    
>> return TopFieldDocs.  The sort is defined like: sort = new Sort(new
>> SortField("DATEISSUED", SortField.LONG, true)); and I am passing filter as
>> null.  The query I am passing is : +SK:1J +TEAMID:1 which return results
>> successfully when I run it thru Luke. I am getting the following exception
>> when I run this code in tomcat (with sort).
>> Does anyone have an idea about what I am doing wrong?
>>
>> thanks
>> -siraj
>>
>> java.lang.ArrayIndexOutOfBoundsException: 0
>>            at
>> org.apache.lucene.search.FieldComparator$LongComparator.copy(FieldCom
>> parator.java:387)
>>            at
>> org.apache.lucene.search.TopFieldCollector$OneComparatorNonScoringColl
>> ector.collect(TopFieldCollector.java:84)
>>            at
>> org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:292)
>>            at
>> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:248)
>>            at
>> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:236)
>>            at
>> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:179)
>>            at org.apache.lucene.search.Searcher.search(Searcher.java:90)
>>            at
>> com.axelon.jobindex.JobIndex.runSearch_JobDiva(JobIndex.java:325)
>>            at JobSearchServlet.service(JobSearchServlet.java:73)
>>            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>            at
>>
>>      
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> Fi
>    
>> lterChain.java:252)
>>            at
>>
>>      
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ai
>    
>> n.java:173)
>>            at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
>> alve.java:213)
>>            at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
>> ve.java:178)
>>            at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
>> 126)
>>            at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
>> 05)
>>            at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>> java:107)
>>            at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
>> 48)
>>            at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
>> 9)
>>            at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.pr
>> ocessConnection(Http11BaseProtocol.java:664)
>>            at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
>> .java:527)
>>            at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollo
>> werWorkerThread.java:80)
>>            at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
>> l.java:684)
>>            at java.lang.Thread.run(Thread.java:619)
>> java.lang.ArrayIndexOutOfBoundsException: 0
>>            at
>> org.apache.lucene.search.FieldComparator$LongComparator.copy(FieldCom
>> parator.java:387)
>>            at
>> org.apache.lucene.search.TopFieldCollector$OneComparatorNonScoringColl
>> ector.collect(TopFieldCollector.java:84)
>>            at
>> org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:292)
>>            at
>> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:248)
>>            at
>> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:236)
>>            at
>> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:179)
>>            at org.apache.lucene.search.Searcher.search(Searcher.java:90)
>>            at
>> com.axelon.jobindex.JobIndex.runSearch_JobDiva(JobIndex.java:325)
>>            at JobSearchServlet.service(JobSearchServlet.java:73)
>>            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>            at
>>
>>      
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> Fi
>    
>> lterChain.java:252)
>>            at
>>
>>      
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ai
>    
>> n.java:173)
>>            at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
>> alve.java:213)
>>            at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
>> ve.java:178)
>>            at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
>> 126)
>>            at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
>> 05)
>>            at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>> java:107)
>>            at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
>> 48)
>>            at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
>> 9)
>>            at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.pr
>> ocessConnection(Http11BaseProtocol.java:664)
>>            at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
>> .java:527)
>>            at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollo
>> werWorkerThread.java:80)
>>            at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
>> l.java:684)
>>            at java.lang.Thread.run(Thread.java:619)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>      
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>    


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message