private void writePotentiallyNegativeVLong(long value) throws IOException { // term freq etc. can be negative if not present... we transport that // further... output.writeVLong(Math.max(0, value + 1)); }
private void startField(String fieldName, long termsSize, boolean writePositions, boolean writeOffsets, boolean writePayloads) throws IOException { fields.add(fieldName); fieldOffset.add(output.position()); output.writeVLong(termsSize); // add information on if positions etc. are written output.writeBoolean(writePositions); output.writeBoolean(writeOffsets); output.writeBoolean(writePayloads); }
private BytesReference writeHeader(int numFieldsWritten, boolean getTermStatistics, boolean getFieldStatistics, boolean scores) throws IOException { // now, write the information about offset of the terms in the // termVectors field BytesStreamOutput header = new BytesStreamOutput(); header.writeString(HEADER); header.writeInt(CURRENT_VERSION); header.writeBoolean(getTermStatistics); header.writeBoolean(getFieldStatistics); header.writeBoolean(scores); header.writeVInt(numFieldsWritten); for (int i = 0; i < fields.size(); i++) { header.writeString(fields.get(i)); header.writeVLong(fieldOffset.get(i).longValue()); } header.close(); return header.bytes(); }
private void writePotentiallyNegativeVLong(long value) throws IOException { // term freq etc. can be negative if not present... we transport that // further... output.writeVLong(Math.max(0, value + 1)); }
private void writePotentiallyNegativeVLong(long value) throws IOException { // term freq etc. can be negative if not present... we transport that // further... output.writeVLong(Math.max(0, value + 1)); }
private void writePotentiallyNegativeVLong(long value) throws IOException { // term freq etc. can be negative if not present... we transport that // further... output.writeVLong(Math.max(0, value + 1)); }
private void writePotentiallyNegativeVLong(long value) throws IOException { // term freq etc. can be negative if not present... we transport that // further... output.writeVLong(Math.max(0, value + 1)); } }
private void startField(String fieldName, long termsSize, boolean writePositions, boolean writeOffsets, boolean writePayloads) throws IOException { fields.add(fieldName); fieldOffset.add(output.position()); output.writeVLong(termsSize); // add information on if positions etc. are written output.writeBoolean(writePositions); output.writeBoolean(writeOffsets); output.writeBoolean(writePayloads); }
private void startField(String fieldName, long termsSize, boolean writePositions, boolean writeOffsets, boolean writePayloads) throws IOException { fields.add(fieldName); fieldOffset.add(output.position()); output.writeVLong(termsSize); // add information on if positions etc. are written output.writeBoolean(writePositions); output.writeBoolean(writeOffsets); output.writeBoolean(writePayloads); }
private void startField(String fieldName, long termsSize, boolean writePositions, boolean writeOffsets, boolean writePayloads) throws IOException { fields.add(fieldName); fieldOffset.add(output.position()); output.writeVLong(termsSize); // add information on if positions etc. are written output.writeBoolean(writePositions); output.writeBoolean(writeOffsets); output.writeBoolean(writePayloads); }
private void startField(String fieldName, long termsSize, boolean writePositions, boolean writeOffsets, boolean writePayloads) throws IOException { fields.add(fieldName); fieldOffset.add(output.position()); output.writeVLong(termsSize); // add information on if positions etc. are written output.writeBoolean(writePositions); output.writeBoolean(writeOffsets); output.writeBoolean(writePayloads); }
private BytesReference writeHeader(int numFieldsWritten, boolean getTermStatistics, boolean getFieldStatistics, boolean scores) throws IOException { // now, write the information about offset of the terms in the // termVectors field BytesStreamOutput header = new BytesStreamOutput(); header.writeString(HEADER); header.writeInt(CURRENT_VERSION); header.writeBoolean(getTermStatistics); header.writeBoolean(getFieldStatistics); header.writeBoolean(scores); header.writeVInt(numFieldsWritten); for (int i = 0; i < fields.size(); i++) { header.writeString(fields.get(i)); header.writeVLong(fieldOffset.get(i).longValue()); } header.close(); return header.bytes(); }
private BytesReference writeHeader(int numFieldsWritten, boolean getTermStatistics, boolean getFieldStatistics, boolean scores) throws IOException { // now, write the information about offset of the terms in the // termVectors field BytesStreamOutput header = new BytesStreamOutput(); header.writeString(HEADER); header.writeInt(CURRENT_VERSION); header.writeBoolean(getTermStatistics); header.writeBoolean(getFieldStatistics); header.writeBoolean(scores); header.writeVInt(numFieldsWritten); for (int i = 0; i < fields.size(); i++) { header.writeString(fields.get(i)); header.writeVLong(fieldOffset.get(i).longValue()); } header.close(); return header.bytes(); }
private BytesReference writeHeader(int numFieldsWritten, boolean getTermStatistics, boolean getFieldStatistics, boolean scores) throws IOException { // now, write the information about offset of the terms in the // termVectors field BytesStreamOutput header = new BytesStreamOutput(); header.writeString(HEADER); header.writeInt(CURRENT_VERSION); header.writeBoolean(getTermStatistics); header.writeBoolean(getFieldStatistics); header.writeBoolean(scores); header.writeVInt(numFieldsWritten); for (int i = 0; i < fields.size(); i++) { header.writeString(fields.get(i)); header.writeVLong(fieldOffset.get(i).longValue()); } header.close(); return header.bytes(); }
private BytesReference writeHeader(int numFieldsWritten, boolean getTermStatistics, boolean getFieldStatistics, boolean scores) throws IOException { // now, write the information about offset of the terms in the // termVectors field BytesStreamOutput header = new BytesStreamOutput(); header.writeString(HEADER); header.writeInt(CURRENT_VERSION); header.writeBoolean(getTermStatistics); header.writeBoolean(getFieldStatistics); header.writeBoolean(scores); header.writeVInt(numFieldsWritten); for (int i = 0; i < fields.size(); i++) { header.writeString(fields.get(i)); header.writeVLong(fieldOffset.get(i).longValue()); } header.close(); return header.bytes(); }