Examples of binaryValue()


Examples of org.apache.lucene.document.StoredField.binaryValue()

    Document doc = new Document();
    Field f = new StoredField("binary", b, 10, 17);
    byte[] bx = f.binaryValue().bytes;
    assertTrue(bx != null);
    assertEquals(50, bx.length);
    assertEquals(10, f.binaryValue().offset);
    assertEquals(17, f.binaryValue().length);
    doc.add(f);
    w.addDocument(doc);
    w.close();
View Full Code Here

Examples of org.apache.lucene.document.StoredField.binaryValue()

    Field f = new StoredField("binary", b, 10, 17);
    byte[] bx = f.binaryValue().bytes;
    assertTrue(bx != null);
    assertEquals(50, bx.length);
    assertEquals(10, f.binaryValue().offset);
    assertEquals(17, f.binaryValue().length);
    doc.add(f);
    w.addDocument(doc);
    w.close();

    IndexReader ir = DirectoryReader.open(dir);
View Full Code Here

Examples of org.apache.lucene.index.IndexableField.binaryValue()

       
        if (hasPayloads) {
          IndexableField payload = doc.getField(payloadField);
          if (payload == null) {
            throw new IllegalArgumentException(payloadField + " does not exist");
          } else if (payload.binaryValue() == null) {
            throw new IllegalArgumentException(payloadField + " does not have binary value");
          }
          currentPayload = payload.binaryValue();
        }
       
View Full Code Here

Examples of org.apache.lucene.index.IndexableField.binaryValue()

          if (payload == null) {
            throw new IllegalArgumentException(payloadField + " does not exist");
          } else if (payload.binaryValue() == null) {
            throw new IllegalArgumentException(payloadField + " does not have binary value");
          }
          currentPayload = payload.binaryValue();
        }
       
        currentWeight = getWeight(currentDocId);
       
        IndexableField fieldVal = doc.getField(field);
View Full Code Here

Examples of org.apache.lucene.index.IndexableField.binaryValue()

        BytesRef tempPayload = null;
        BytesRef tempTerm = null;
       
        if (hasPayloads) {
          IndexableField payload = doc.getField(payloadField);
          if (payload == null || (payload.binaryValue() == null && payload.stringValue() == null)) {
            continue;
          }
          tempPayload = (payload.binaryValue() != null) ? payload.binaryValue() : new BytesRef(payload.stringValue());
        }
       
View Full Code Here

Examples of org.apache.lucene.index.IndexableField.binaryValue()

        if (hasPayloads) {
          IndexableField payload = doc.getField(payloadField);
          if (payload == null || (payload.binaryValue() == null && payload.stringValue() == null)) {
            continue;
          }
          tempPayload = (payload.binaryValue() != null) ? payload.binaryValue() : new BytesRef(payload.stringValue());
        }
       
        IndexableField fieldVal = doc.getField(field);
        if (fieldVal == null || (fieldVal.binaryValue() == null && fieldVal.stringValue() == null)) {
          continue;
View Full Code Here

Examples of org.apache.lucene.index.IndexableField.binaryValue()

        if (hasPayloads) {
          IndexableField payload = doc.getField(payloadField);
          if (payload == null || (payload.binaryValue() == null && payload.stringValue() == null)) {
            continue;
          }
          tempPayload = (payload.binaryValue() != null) ? payload.binaryValue() : new BytesRef(payload.stringValue());
        }
       
        IndexableField fieldVal = doc.getField(field);
        if (fieldVal == null || (fieldVal.binaryValue() == null && fieldVal.stringValue() == null)) {
          continue;
View Full Code Here

Examples of org.apache.lucene.index.IndexableField.binaryValue()

          }
          tempPayload = (payload.binaryValue() != null) ? payload.binaryValue() : new BytesRef(payload.stringValue());
        }
       
        IndexableField fieldVal = doc.getField(field);
        if (fieldVal == null || (fieldVal.binaryValue() == null && fieldVal.stringValue() == null)) {
          continue;
        }
        tempTerm = (fieldVal.stringValue() != null) ? new BytesRef(fieldVal.stringValue()) : fieldVal.binaryValue();
       
        currentPayload = tempPayload;
View Full Code Here

Examples of org.apache.lucene.index.IndexableField.binaryValue()

       
        IndexableField fieldVal = doc.getField(field);
        if (fieldVal == null || (fieldVal.binaryValue() == null && fieldVal.stringValue() == null)) {
          continue;
        }
        tempTerm = (fieldVal.stringValue() != null) ? new BytesRef(fieldVal.stringValue()) : fieldVal.binaryValue();
       
        currentPayload = tempPayload;
        currentWeight = getWeight(doc, currentDocId);
       
        return tempTerm;
View Full Code Here

Examples of org.apache.lucene.index.IndexableField.binaryValue()

    for (Field fld : fields) {
      String fldName = fld.name();
      final Document sDoc = reader.document(docID, Collections.singleton(fldName));
      final IndexableField sField = sDoc.getField(fldName);
      if (Field.class.equals(fld.getClass())) {
        assertEquals(fld.binaryValue(), sField.binaryValue());
        assertEquals(fld.stringValue(), sField.stringValue());
      } else {
        assertEquals(fld.numericValue(), sField.numericValue());
      }
    }
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.