Examples of doubleVal()


Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

      while (doc < length && (doc = matchingDocs.bits.nextSetBit(doc)) != -1) {
        scorer.docID = doc;
        scorer.score = matchingDocs.scores[scoresIdx++];
        cli.getOrdinals(doc, ordinals);
        final int upto = ordinals.offset + ordinals.length;
        float val = (float) fvalues.doubleVal(doc);
        for (int i = ordinals.offset; i < upto; i++) {
          aggValues[ordinals.ints[i]] += val;
        }
        ++doc;
      }
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

      final float[] aggValues = facetArrays.getFloatArray();
      int doc = 0;
      while (doc < length && (doc = matchingDocs.bits.nextSetBit(doc)) != -1) {
        cli.getOrdinals(doc, ordinals);
        final int upto = ordinals.offset + ordinals.length;
        float val = (float) fvalues.doubleVal(doc);
        for (int i = ordinals.offset; i < upto; i++) {
          aggValues[ordinals.ints[i]] += val;
        }
        ++doc;
      }
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

      @Override
      public double doubleVal(int doc) {
        Integer key = Integer.valueOf( base+doc );
        Double v = cache.get( key );
        if( v == null ) {
          v = Double.valueOf( vals.doubleVal(doc) );
          cache.put( key, v );
        }
        return v.doubleValue();
      }
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

   * use the FunctionValues class.
   */
  @SuppressWarnings({"unused", "null"})
  private static void unusedTestCompile() {
    FunctionValues f = null;
    double ret = f.doubleVal(2);
  }
 
  /**
   * Constructs a compiler for expressions.
   * @param sourceText The expression to compile
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

        ords.get(doc, scratch);
        if (keepScores) {
          scorer.docID = doc;
          scorer.score = scores[scoresIdx++];
        }
        float value = (float) functionValues.doubleVal(doc);
        for(int i=0;i<scratch.length;i++) {
          values[scratch.ints[i]] += value;
        }
      }
    }
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

                  return false;
                }
                if (fastMatchBits != null && fastMatchBits.get(docID) == false) {
                  return false;
                }
                return accept(values.doubleVal(docID));
              }

              @Override
              public int length() {
                return maxDoc;
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

          doc++;
          continue;
        }
        // Skip missing docs:
        if (fv.exists(doc)) {
          counter.add(NumericUtils.doubleToSortableLong(fv.doubleVal(doc)));
        } else {
          missingCount++;
        }
      }
    }
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

        ords.get(doc, scratch);
        if (keepScores) {
          scorer.docID = doc;
          scorer.score = scores[scoresIdx++];
        }
        float value = (float) functionValues.doubleVal(doc);
        for(int i=0;i<scratch.length;i++) {
          values[scratch.ints[i]] += value;
        }
      }
    }
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

  public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException {
    final FunctionValues values = source.getValues( null, context );
    return new FilteredDocIdSet(startingFilter.getDocIdSet(context, acceptDocs)) {
      @Override
      public boolean match(int doc) {
        double val = values.doubleVal( doc );
        return val >= min && val <= max;
      }
    };
  }
}
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.doubleVal()

      @Override
      public double doubleVal(int doc) {
        Integer key = Integer.valueOf( base+doc );
        Double v = cache.get( key );
        if( v == null ) {
          v = Double.valueOf( vals.doubleVal(doc) );
          cache.put( key, v );
        }
        return v.doubleValue();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.