Java Code Examples for org.apache.lucene.document.DoublePoint#decodeDimension()
The following examples show how to use
org.apache.lucene.document.DoublePoint#decodeDimension() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PointMerger.java From lucene-solr with Apache License 2.0 | 6 votes |
@Override public void visit(int docID, byte[] packedValue) throws IOException { // TODO: handle filter or deleted documents? double v = DoublePoint.decodeDimension(packedValue, 0); if (v < last) return; if (v == last && pos >= 0) { count[pos]++; } else { if (pos+1 < values.length) { last = v; ++pos; values[pos] = v; count[pos] = 1; } else { // a new value we don't have room for throw breakException; } } }
Example 2
Source File: PointMerger.java From lucene-solr with Apache License 2.0 | 5 votes |
@Override public PointValues.Relation compare(byte[] minPackedValue, byte[] maxPackedValue) { double v = DoublePoint.decodeDimension(maxPackedValue, 0); if (v >= last) { return PointValues.Relation.CELL_CROSSES_QUERY; } else { return PointValues.Relation.CELL_OUTSIDE_QUERY; } }
Example 3
Source File: DoublePointField.java From lucene-solr with Apache License 2.0 | 4 votes |
@Override public Object toObject(SchemaField sf, BytesRef term) { return DoublePoint.decodeDimension(term.bytes, term.offset); }
Example 4
Source File: NumberFieldMapper.java From crate with Apache License 2.0 | 4 votes |
@Override public Number parsePoint(byte[] value) { return DoublePoint.decodeDimension(value, 0); }