Package org.apache.solr.request.compare

Examples of org.apache.solr.request.compare.MergerGroupByGroupbyRowCompare$CompareDist


    res.add("count", recordCount.toNamedList());
   
    ConcurrentHashMap<Long,String> cache=null;

    boolean issetCrc=this.parse.crcOutputSet!=null;
    MergerGroupByGroupbyRowCompare mergerCmp=null;
    if(issetCrc)
    {
      synchronized (MdrillUtils.CRC_CACHE_SIZE) {
        cache=MdrillUtils.CRC_CACHE_SIZE.get(this.parse.crcOutputSet);
        if(cache==null)
View Full Code Here


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

     
      long t1=System.currentTimeMillis();
        Collection<GroupbyRow> collections=counts.values();

      int sz=counts.size();
        final MergerGroupByGroupbyRowCompare cmp=this.createMergerGroupCmp();
       if(sz<=(saverecords*2))
         {
         GroupbyRow[] arr = new GroupbyRow[sz];
           int index=0;
           for(GroupbyRow f:collections)
           {
             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<GroupbyRow> res = new PriorityQueue<GroupbyRow>(saverecords, Collections.reverseOrder(cmp));
      for(GroupbyRow f:collections)
      {
        GroupbyRow 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.MergerGroupByGroupbyRowCompare$CompareDist

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.