Examples of BinaryDocValuesUpdate


Examples of org.apache.lucene.index.DocValuesUpdate.BinaryDocValuesUpdate

    return applyAllDeletes(deleteQueue);
  }
 
  synchronized boolean updateBinaryDocValue(Term term, String field, BytesRef value) throws IOException {
    final DocumentsWriterDeleteQueue deleteQueue = this.deleteQueue;
    deleteQueue.addBinaryUpdate(new BinaryDocValuesUpdate(term, field, value));
    flushControl.doOnDelete();
    return applyAllDeletes(deleteQueue);
  }
View Full Code Here

Examples of org.apache.lucene.index.DocValuesUpdate.BinaryDocValuesUpdate

    if (fieldUpdates == null) {
      fieldUpdates = new LinkedHashMap<>();
      binaryUpdates.put(update.field, fieldUpdates);
      bytesUsed.addAndGet(BYTES_PER_BINARY_FIELD_ENTRY);
    }
    final BinaryDocValuesUpdate current = fieldUpdates.get(update.term);
    if (current != null && docIDUpto < current.docIDUpto) {
      // Only record the new number if it's greater than or equal to the current
      // one. This is important because if multiple threads are replacing the
      // same doc at nearly the same time, it's possible that one thread that
      // got a higher docID is scheduled before the other threads.
View Full Code Here

Examples of org.apache.lucene.index.DocValuesUpdate.BinaryDocValuesUpdate

        switch (update.type) {
          case NUMERIC:
            bufferedUpdates.addNumericUpdate(new NumericDocValuesUpdate(update.term, update.field, (Long) update.value), docIDUpto);
            break;
          case BINARY:
            bufferedUpdates.addBinaryUpdate(new BinaryDocValuesUpdate(update.term, update.field, (BytesRef) update.value), docIDUpto);
            break;
          default:
            throw new IllegalArgumentException(update.type + " DocValues updates not supported yet!");
        }
      }
View Full Code Here

Examples of org.apache.lucene.index.DocValuesUpdate.BinaryDocValuesUpdate

    }
    if (!globalFieldNumberMap.contains(field, DocValuesType.BINARY)) {
      throw new IllegalArgumentException("can only update existing binary-docvalues fields!");
    }
    try {
      if (docWriter.updateDocValues(new BinaryDocValuesUpdate(term, field, value))) {
        processEvents(true, false);
      }
    } catch (OutOfMemoryError oom) {
      handleOOM(oom, "updateBinaryDocValue");
    }
View Full Code Here

Examples of org.apache.lucene.index.DocValuesUpdate.BinaryDocValuesUpdate

      switch (dvType) {
        case NUMERIC:
          dvUpdates[i] = new NumericDocValuesUpdate(term, f.name(), (Long) f.numericValue());
          break;
        case BINARY:
          dvUpdates[i] = new BinaryDocValuesUpdate(term, f.name(), f.binaryValue());
          break;
        default:
          throw new IllegalArgumentException("can only update NUMERIC or BINARY fields: field=" + f.name() + ", type=" + dvType);
      }
    }
View Full Code Here

Examples of org.apache.lucene.index.DocValuesUpdate.BinaryDocValuesUpdate

    if (fieldUpdates == null) {
      fieldUpdates = new LinkedHashMap<>();
      binaryUpdates.put(update.field, fieldUpdates);
      bytesUsed.addAndGet(BYTES_PER_BINARY_FIELD_ENTRY);
    }
    final BinaryDocValuesUpdate current = fieldUpdates.get(update.term);
    if (current != null && docIDUpto < current.docIDUpto) {
      // Only record the new number if it's greater than or equal to the current
      // one. This is important because if multiple threads are replacing the
      // same doc at nearly the same time, it's possible that one thread that
      // got a higher docID is scheduled before the other threads.
View Full Code Here

Examples of org.apache.lucene.index.DocValuesUpdate.BinaryDocValuesUpdate

      clone.docIDUpto = Integer.MAX_VALUE;
      numericDVUpdates.add(clone);
    }
   
    for (BinaryDocValuesUpdate bu : in.binaryDVUpdates) {
      BinaryDocValuesUpdate clone = new BinaryDocValuesUpdate(bu.term, bu.field, (BytesRef) bu.value);
      clone.docIDUpto = Integer.MAX_VALUE;
      binaryDVUpdates.add(clone);
    }
  }
View Full Code Here

Examples of org.apache.lucene.index.DocValuesUpdate.BinaryDocValuesUpdate

    return applyAllDeletes(deleteQueue);
  }
 
  synchronized boolean updateBinaryDocValue(Term term, String field, BytesRef value) throws IOException {
    final DocumentsWriterDeleteQueue deleteQueue = this.deleteQueue;
    deleteQueue.addBinaryUpdate(new BinaryDocValuesUpdate(term, field, value));
    flushControl.doOnDelete();
    return applyAllDeletes(deleteQueue);
  }
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.