Examples of IntDocValues


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

  @Override
  public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
    Fields fields = readerContext.reader().fields();
    final Terms terms = fields.terms(indexedField);

    return new IntDocValues(this) {
      DocsEnum docs ;
      int atDoc;
      int lastDocRequested = -1;

      { reset(); }
View Full Code Here

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

    final BinaryDocValues terms = cache.getTerms(readerContext.reader(), field, false, PackedInts.FAST);
    final IndexReader top = ReaderUtil.getTopLevelContext(readerContext).reader();
    Terms t = MultiFields.getTerms(top, qfield);
    final TermsEnum termsEnum = t == null ? TermsEnum.EMPTY : t.iterator(null);
   
    return new IntDocValues(this) {

      @Override
      public int intVal(int doc)
      {
        try {
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 BinaryDocValues terms = cache.getTerms(readerContext.reader(), field, PackedInts.FAST);
    final IndexReader top = ReaderUtil.getTopLevelContext(readerContext).reader();
    Terms t = MultiFields.getTerms(top, qfield);
    final TermsEnum termsEnum = t == null ? TermsEnum.EMPTY : t.iterator(null);
   
    return new IntDocValues(this) {
      final BytesRef ref = new BytesRef();

      @Override
      public int intVal(int 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

  @Override
  public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
    Fields fields = readerContext.reader().fields();
    final Terms terms = fields.terms(indexedField);

    return new IntDocValues(this) {
      DocsEnum docs ;
      int atDoc;
      int lastDocRequested = -1;

      { reset(); }
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

    final IndexReader topReader = ReaderUtil.getTopLevelContext(readerContext).reader();
    final AtomicReader r = topReader instanceof CompositeReader
        ? new SlowCompositeReaderWrapper((CompositeReader)topReader)
        : (AtomicReader) 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

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

    final BinaryDocValues terms = cache.getTerms(readerContext.reader(), field, false, PackedInts.FAST);
    final IndexReader top = ReaderUtil.getTopLevelContext(readerContext).reader();
    Terms t = MultiFields.getTerms(top, qfield);
    final TermsEnum termsEnum = t == null ? TermsEnum.EMPTY : t.iterator(null);
   
    return new IntDocValues(this) {
      final BytesRef ref = new BytesRef();

      @Override
      public int intVal(int doc)
      {
View Full Code Here

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

  @Override
  public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
    Fields fields = readerContext.reader().fields();
    final Terms terms = fields.terms(indexedField);

    return new IntDocValues(this) {
      DocsEnum docs ;
      int atDoc;
      int lastDocRequested = -1;

      { reset(); }
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.