Package org.apache.solr.request.compare

Examples of org.apache.solr.request.compare.MergerDetailSelectDetailRowCompare


      return new MergerGroupByGroupbyRowCompare(this.sort_column_type,this.facetFs, this.crossFs,this.distFS, this.joinSort, this.sort_fl, this.sort_type, this.isdesc);
    }
   
    public MergerDetailSelectDetailRowCompare createMergerDetailCmp()
    {
      return new MergerDetailSelectDetailRowCompare(this.sort_column_type,this.isdesc);
    }
View Full Code Here


  }

    public GroupbyItem[] getPairSortedDetail(int saverecords) {
      long t1=System.currentTimeMillis();
      int sz=countsDetail.size();
        final MergerDetailSelectDetailRowCompare cmp=this.createMergerDetailCmp();
       if(sz<=(saverecords*2))
         {
         SelectDetailRow[] arr = new SelectDetailRow[sz];
           int index=0;
           for(SelectDetailRow f:countsDetail)
           {
             arr[index]=f;
             index++;
           }
           Arrays.sort(arr, cmp);
           long t2=System.currentTimeMillis();
           LOG.info("####merger sort#### by array sort size="+sz+",timetaken="+(t2-t1));
           return arr;
          
         }
      
        PriorityQueue<SelectDetailRow> res = new PriorityQueue<SelectDetailRow>(saverecords, Collections.reverseOrder(cmp));
      for(SelectDetailRow f:countsDetail)
      {
        SelectDetailRow mrow=f;
        if (res.size() < saverecords) {
          res.add(mrow);
        } else if (cmp.compare(res.peek(), mrow) > 0) {
          res.add(mrow);
          res.poll();
        }
      }
     
View Full Code Here

TOP

Related Classes of org.apache.solr.request.compare.MergerDetailSelectDetailRowCompare

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.