lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fehling <bernd.fehl...@uni-bielefeld.de>
Subject Re: com.sun.jdi.InvocationException occurred invoking method
Date Wed, 14 Nov 2012 12:58:54 GMT
OK, so the solution will be that ScoreDoc.toString() should return
a local string with "return s;", right?

Regards
Bernd


Am 14.11.2012 13:38, schrieb Uwe Schindler:
> Fields is only used while sorting results against fields.
> 
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
> 
> 
>> -----Original Message-----
>> From: Bernd Fehling [mailto:bernd.fehling@uni-bielefeld.de]
>> Sent: Wednesday, November 14, 2012 1:18 PM
>> To: java-user@lucene.apache.org
>> Subject: Re: com.sun.jdi.InvocationException occurred invoking method
>>
>> While inspecting the content of topDocs.ScoreDoc I see 4 variables:
>> - doc
>> - fields
>> - score
>> - shardIndex
>> But ScoreDoc knows only about 3 (doc, score, shardIndex) is this the
>> problem?
>>
>> Regards
>> Bernd
>>
>>
>>
>> Am 14.11.2012 13:04, schrieb Bernd Fehling:
>>> Hi list,
>>> while walking through the code with debugger (eclipse juno) I get the
>> following:
>>> com.sun.jdi.InvocationException occurred invoking method.
>>> This is while trying to see org.apache.lucene.search.ScoreDoc
>>>
>>> So the debugger seams to have a problem with the toString() of
>>> ScoreDoc.java which looks as follows:
>>>
>>>   // A convenience method for debugging.
>>>   @Override
>>>   public String toString() {
>>>     return "doc=" + doc + " score=" + score + " shardIndex=" + shardIndex;
>>>   }
>>>
>>> I have no problems with toString() from other classes so the solution
>>> might be to first create a String and return the String value?
>>>
>>>   // A convenience method for debugging.
>>>   @Override
>>>   public String toString() {
>>>     String s = "doc=" + doc + " score=" + score + " shardIndex=" + shardIndex;
>>>     return s;
>>>   }
>>>
>>> Or use a StringBuilder like in org.apache.lucene.search.Sort.toString()?
>>>
>>> Any thoughts on this?
>>>
>>> Regards
>>> Bernd
>>

---------------------------------------------------------------------
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