Examples of IntDocValues


Examples of org.apache.lucene.queries.function.docvalues.IntDocValues

  @Override
  public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
    final FieldCache.Ints arr = cache.getInts(readerContext.reader(), field, parser, true);
    final Bits valid = cache.getDocsWithField(readerContext.reader(), field);

    return new IntDocValues(this) {
      final MutableValueInt val = new MutableValueInt();

      @Override
      public float floatVal(int doc) {
        return (float) arr.get(doc);
View Full Code Here

Examples of org.apache.lucene.queries.function.docvalues.IntDocValues

  @Override
  public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
    final FieldCache.Ints arr = cache.getInts(readerContext.reader(), field, parser, true);
    final Bits valid = cache.getDocsWithField(readerContext.reader(), field);
   
    return new IntDocValues(this) {
      final MutableValueInt val = new MutableValueInt();
     
      @Override
      public float floatVal(int doc) {
        return (float)arr.get(doc);
View Full Code Here

Examples of org.apache.lucene.queries.function.docvalues.IntDocValues

    final int off = readerContext.docBase;

    final SortedDocValues sindex = FieldCache.DEFAULT.getTermsIndex(r, field);
    final int end = sindex.getValueCount();

    return new IntDocValues(this) {
     @Override
      public int intVal(int doc) {
        return (end - sindex.getOrd(doc+off) - 1);
      }
    };
View Full Code Here

Examples of org.apache.lucene.queries.function.docvalues.IntDocValues

  public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
    final int off = readerContext.docBase;
    final IndexReader topReader = ReaderUtil.getTopLevelContext(readerContext).reader();
    final AtomicReader r = SlowCompositeReaderWrapper.wrap(topReader);
    final SortedDocValues sindex = FieldCache.DEFAULT.getTermsIndex(r, field);
    return new IntDocValues(this) {
      protected String toTerm(String readableValue) {
        return readableValue;
      }
      @Override
      public int intVal(int doc) {
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.