Package com.browseengine.bobo.facets.data

Examples of com.browseengine.bobo.facets.data.TermLongList


      BigSegmentedArray baseCounts = _baseCollector.getCountDistribution();
      if(_start instanceof Long)
      {
        long start = _start.longValue();
        long unit = _unit.longValue();
        TermLongList valArray = (TermLongList)_valArray;
        for(int i = startIdx; i < endIdx; i++)
        {
          long val = valArray.getPrimitiveValue(i);
          int idx = (int)((val - start) / unit);
          if(idx >= 0 && idx < _count.size())
          {
            _count.add(idx, _count.get(idx) + baseCounts.get(i));
          }
        }
      }
      else if(_start instanceof Integer)
      {
        int start = _start.intValue();
        int unit = _unit.intValue();
        TermIntList valArray = (TermIntList)_valArray;
        for(int i = startIdx; i < endIdx; i++)
        {
          int val = valArray.getPrimitiveValue(i);
          int idx = ((val - start) / unit);
          if(idx >= 0 && idx < _count.size())
          {
            _count.add(idx, _count.get(idx) + baseCounts.get(i));
          }
View Full Code Here


      int[] baseCounts = _baseCollector.getCountDistribution();
      if(_start instanceof Long)
      {
        long start = _start.longValue();
        long unit = _unit.longValue();
        TermLongList valArray = (TermLongList)_valArray;
        for(int i = startIdx; i < endIdx; i++)
        {
          long val = valArray.getPrimitiveValue(i);
          int idx = (int)((val - start) / unit);
          if(idx >= 0 && idx < _count.length)
          {
            _count[idx] += baseCounts[i];
          }
        }
      }
      else if(_start instanceof Integer)
      {
        int start = _start.intValue();
        int unit = _unit.intValue();
        TermIntList valArray = (TermIntList)_valArray;
        for(int i = startIdx; i < endIdx; i++)
        {
          int val = valArray.getPrimitiveValue(i);
          int idx = ((val - start) / unit);
          if(idx >= 0 && idx < _count.length)
          {
            _count[idx] += baseCounts[i];
          }
View Full Code Here

      BigSegmentedArray baseCounts = _baseCollector.getCountDistribution();
      if (_start instanceof Long) {
        long start = _start.longValue();
        long unit = _unit.longValue();
        TermLongList valArray = (TermLongList) _valArray;
        for (int i = startIdx; i < endIdx; i++) {
          long val = valArray.getPrimitiveValue(i);
          int idx = (int) ((val - start) / unit);
          if (idx >= 0 && idx < _count.size()) {
            _count.add(idx, _count.get(idx) + baseCounts.get(i));
          }
        }
      } else if (_start instanceof Integer) {
        int start = _start.intValue();
        int unit = _unit.intValue();
        TermIntList valArray = (TermIntList) _valArray;
        for (int i = startIdx; i < endIdx; i++) {
          int val = valArray.getPrimitiveValue(i);
          int idx = ((val - start) / unit);
          if (idx >= 0 && idx < _count.size()) {
            _count.add(idx, _count.get(idx) + baseCounts.get(i));
          }
        }
View Full Code Here

      if (dataObj instanceof FacetDataCache<?>) {
        @SuppressWarnings("unchecked")
        FacetDataCache<Long> facetDataCache = (FacetDataCache<Long>) (boboReader
            .getFacetData(_timeFacetName));
        final BigSegmentedArray orderArray = facetDataCache.orderArray;
        final TermLongList termList = (TermLongList) facetDataCache.valArray;
        Explanation finalExpl = new Explanation();
        finalExpl.addDetail(innerExplaination);
        float rawScore = innerExplaination.getValue();
        long timeVal = termList.getPrimitiveValue(orderArray.get(doc));
        float timeScore = computeTimeFactor(timeVal);
        float finalScore = combineScores(timeScore, rawScore);
        finalExpl.setValue(finalScore);
        finalExpl.setDescription("final score = (time score: " + timeScore + ") * (raw score: "
            + rawScore + "), timeVal: " + timeVal);
View Full Code Here

      if (dataObj instanceof FacetDataCache<?>) {
        @SuppressWarnings("unchecked")
        FacetDataCache<Long> facetDataCache = (FacetDataCache<Long>) (boboReader
            .getFacetData(_timeFacetName));
        final BigSegmentedArray orderArray = facetDataCache.orderArray;
        final TermLongList termList = (TermLongList) facetDataCache.valArray;
        return new Scorer(innerScorer.getWeight()) {

          @Override
          public float score() throws IOException {
            float rawScore = innerScorer.score();
            long timeVal = termList.getRawValue(orderArray.get(innerScorer.docID()));
            float timeScore = computeTimeFactor(timeVal);
            return combineScores(timeScore, rawScore);
          }

          @Override
View Full Code Here

      int[] baseCounts = _baseCollector.getCountDistribution();
      if(_start instanceof Long)
      {
        long start = _start.longValue();
        long unit = _unit.longValue();
        TermLongList valArray = (TermLongList)_valArray;
        for(int i = startIdx; i < endIdx; i++)
        {
          long val = valArray.getPrimitiveValue(i);
          int idx = (int)((val - start) / unit);
          if(idx >= 0 && idx < _count.length)
          {
            _count[idx] += baseCounts[i];
          }
        }
      }
      else if(_start instanceof Integer)
      {
        int start = _start.intValue();
        int unit = _unit.intValue();
        TermIntList valArray = (TermIntList)_valArray;
        for(int i = startIdx; i < endIdx; i++)
        {
          int val = valArray.getPrimitiveValue(i);
          int idx = ((val - start) / unit);
          if(idx >= 0 && idx < _count.length)
          {
            _count[idx] += baseCounts[i];
          }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.facets.data.TermLongList

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.