There is no good reason for that packing of docid and position into a long.
the positions should be a separate array (SorterTemplate already being used here to sort things in parallel) On Sat, Mar 8, 2014 at 8:16 AM, Uwe Schindler <[email protected]> wrote: > But it is declared as long[] in the code, so either the declaration of the > array is wrong or the code overflows. > > > > Uwe > > > > ----- > > Uwe Schindler > > H.-H.-Meier-Allee 63, D-28213 Bremen > > http://www.thetaphi.de > > eMail: [email protected] > > > > From: Robert Muir [mailto:[email protected]] > Sent: Saturday, March 08, 2014 1:40 PM > To: [email protected] > Subject: RE: svn commit: r1575446 - > /lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java > > > > If they are lucene docids it is fine. > > On Mar 8, 2014 6:11 AM, "Uwe Schindler" <[email protected]> wrote: > > Hi Hoss, > > this may easily overflow (not even Integer.compare may be implemented by > subtraction!!!). I committed a duplicate of the code from Lucene's > FieldComparator, which is correct. > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: [email protected] > > >> -----Original Message----- >> From: [email protected] [mailto:[email protected]] >> Sent: Saturday, March 08, 2014 12:05 AM >> To: [email protected] >> Subject: svn commit: r1575446 - >> /lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handl >> er/component/QueryComponent.java >> >> Author: hossman >> Date: Fri Mar 7 23:04:36 2014 >> New Revision: 1575446 >> >> URL: http://svn.apache.org/r1575446 >> Log: >> SOLR-5818: Fix java1.6 source compatibility >> >> Modified: >> >> lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handle >> r/component/QueryComponent.java >> >> Modified: >> lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handle >> r/component/QueryComponent.java >> URL: >> http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/sr >> c/java/org/apache/solr/handler/component/QueryComponent.java?rev=15 >> 75446&r1=1575445&r2=1575446&view=diff >> ========================================================== >> ==================== >> --- >> lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handle >> r/component/QueryComponent.java (original) >> +++ >> lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/handle >> r/component/QueryComponent.java Fri Mar 7 23:04:36 2014 >> @@ -525,7 +525,7 @@ public class QueryComponent extends Sear >> >> @Override >> protected int compare(int i, int j) { >> - return Long.compare(sortedIds[i], sortedIds[j]); >> + return (int) (sortedIds[i] - sortedIds[j]); >> } >> }.sort(0, sortedIds.length); >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
