jruby/docs BETA
Navigation
org.apache.lucene.document 56
C BinaryDocValuesField
C BinaryPoint
C BinaryRangeDocValues
C DateTools
C Document
C DocumentStoredFieldVisitor
C DoubleDocValuesField
C DoubleField
C DoublePoint
C DoubleRange
C DoubleRangeDocValuesField
C FeatureField
C Field
C FieldType
C FloatDocValuesField
C FloatField
C FloatPoint
C FloatRange
C FloatRangeDocValuesField
C InetAddressPoint
C InetAddressRange
C IntField
C IntPoint
C IntRange
C IntRangeDocValuesField
E InvertableType
C KeywordField
C KnnByteVectorField
C KnnFloatVectorField
C LatLonDocValuesField
C LatLonPoint
C LatLonShape
C LatLonShapeDocValues
C LatLonShapeDocValuesField
C LateInteractionField
C LongField
C LongPoint
C LongRange
C LongRangeDocValuesField
C NumericDocValuesField
C RangeFieldQuery
C ShapeDocValuesField
C ShapeField
C SortedDocValuesField
C SortedNumericDocValuesField
C SortedSetDocValuesField
C StoredField
C StoredValue
C StringField
C TextField
C XYDocValuesField
C XYDocValuesPointInGeometryQuery
C XYPointField
C XYShape
C XYShapeDocValues
C XYShapeDocValuesField
SortedDocValuesField — members 6+
F TYPE() FieldType
C new(name, bytes)
M indexed_field(name, bytes) SortedDocValuesField
M new_slow_exact_query(field, value) Query
M new_slow_range_query(field, lower_value, upper_value, lower_inclusive, upper_inclusive) Query
M new_slow_set_query(field, values) Query
from Field
M binary_value() BytesRef
C byte_value=(value)
C bytes_value=(value)
C bytes_value=(value)
M char_sequence_value() CharSequence
C double_value=(value)
M field_type() IndexableFieldType
C float_value=(value)
C int_value=(value)
M invertable_type() InvertableType
C long_value=(value)
M name() String
M numeric_value() Number
M reader_value() Reader
C reader_value=(value)
C short_value=(value)
M stored_value() StoredValue
M string_value() String
C string_value=(value)
M to_string() String
M token_stream(analyzer, reuse) TokenStream
C token_stream=(token_stream)
M token_stream_value() TokenStream

org.apache.lucene.document.SortedDocValuesField

class extends Field 6 members

Field that stores a per-document BytesRef value, indexed for sorting. Here's an example usage:

  document.add(new SortedDocValuesField(name, new BytesRef("hello")));

If you also need to store the value, you should add a separate StoredField instance.

This value can be at most 32766 bytes long.

Constants

constanttypenote
TYPE FieldType Type for sorted bytes DocValues

Constructors

new

new ( String name, BytesRef bytes )
Java: <init>(String name, org.apache.lucene.util.BytesRef bytes)

Create a new sorted DocValues field.

nametypedescription
nameStringfield name
bytesorg.apache.lucene.util.BytesRefbinary content

Throws

IllegalArgumentException if the field name is null

Class Methods

indexed_field

SortedDocValuesField indexed_field ( String name, BytesRef bytes )
Java: indexedField(String name, org.apache.lucene.util.BytesRef bytes)

Creates a new SortedDocValuesField with the specified 64-bit long value that also creates a skip index.

nametypedescription
nameStringfield name
bytesorg.apache.lucene.util.BytesRefbinary content

Throws

IllegalArgumentException if the field name is null

new_slow_exact_query

Query new_slow_exact_query ( String field, BytesRef value )
Java: newSlowExactQuery(String field, org.apache.lucene.util.BytesRef value)

Create a query for matching an exact BytesRef value.

NOTE: Such queries cannot efficiently advance to the next match, which makes them slow if they are not ANDed with a selective query. As a consequence, they are best used wrapped in an IndexOrDocValuesQuery, alongside a range query that executes on points, such as BinaryPoint#newExactQuery.

new_slow_range_query

Query new_slow_range_query ( String field, BytesRef lower_value, BytesRef upper_value, boolean lower_inclusive, boolean upper_inclusive )
Java: newSlowRangeQuery(String field, org.apache.lucene.util.BytesRef lowerValue, org.apache.lucene.util.BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive)

Create a range query that matches all documents whose value is between lowerValue and upperValue included.

You can have half-open ranges by setting lowerValue = null or upperValue = null.

NOTE: Such queries cannot efficiently advance to the next match, which makes them slow if they are not ANDed with a selective query. As a consequence, they are best used wrapped in an IndexOrDocValuesQuery, alongside a range query that executes on points, such as BinaryPoint#newRangeQuery.

new_slow_set_query

Query new_slow_set_query ( String field, Collection<BytesRef> values )
Java: newSlowSetQuery(String field, Collection<org.apache.lucene.util.BytesRef> values)

Create a query matching any of the specified values.

NOTE: Such queries cannot efficiently advance to the next match, which makes them slow if they are not ANDed with a selective query. As a consequence, they are best used wrapped in an IndexOrDocValuesQuery, alongside a set query that executes on postings, such as TermInSetQuery.

Inherited

from Field

binary_value

BytesRef binary_value ( )
Java: binaryValue()

byte_value=

byte_value= ( byte value )
Java: setByteValue(byte value) · also: set_byte_value

Expert: change the value of this field. See #setStringValue(String).

bytes_value=

bytes_value= ( byte[] value )
Java: setBytesValue(byte[] value) · also: set_bytes_value

Expert: change the value of this field. See #setStringValue(String).

bytes_value=

bytes_value= ( BytesRef value )
Java: setBytesValue(org.apache.lucene.util.BytesRef value) · also: set_bytes_value

Expert: change the value of this field. See #setStringValue(String).

NOTE: the provided BytesRef is not copied so be sure not to change it until you're done with this field.

char_sequence_value

CharSequence char_sequence_value ( )
Java: getCharSequenceValue() · also: get_char_sequence_value

double_value=

double_value= ( double value )
Java: setDoubleValue(double value) · also: set_double_value

Expert: change the value of this field. See #setStringValue(String).

field_type

IndexableFieldType field_type ( )
Java: fieldType()

Returns the FieldType for this field.

float_value=

float_value= ( float value )
Java: setFloatValue(float value) · also: set_float_value

Expert: change the value of this field. See #setStringValue(String).

int_value=

int_value= ( int value )
Java: setIntValue(int value) · also: set_int_value

Expert: change the value of this field. See #setStringValue(String).

invertable_type

InvertableType invertable_type ( )
Java: invertableType()

long_value=

long_value= ( long value )
Java: setLongValue(long value) · also: set_long_value

Expert: change the value of this field. See #setStringValue(String).

name

String name ( )
Java: name()

numeric_value

Number numeric_value ( )
Java: numericValue()

reader_value

Reader reader_value ( )
Java: readerValue()

The value of the field as a Reader, or null. If null, the String value or binary value is used. Exactly one of stringValue(), readerValue(), and binaryValue() must be set.

reader_value=

reader_value= ( Reader value )
Java: setReaderValue(java.io.Reader value) · also: set_reader_value

Expert: change the value of this field. See #setStringValue(String).

short_value=

short_value= ( short value )
Java: setShortValue(short value) · also: set_short_value

Expert: change the value of this field. See #setStringValue(String).

stored_value

StoredValue stored_value ( )
Java: storedValue()

string_value

String string_value ( )
Java: stringValue()

The value of the field as a String, or null. If null, the Reader value or binary value is used. Exactly one of stringValue(), readerValue(), and binaryValue() must be set.

string_value=

string_value= ( String value )
Java: setStringValue(String value) · also: set_string_value

Expert: change the value of this field. This can be used during indexing to re-use a single Field instance to improve indexing speed by avoiding GC cost of new'ing and reclaiming Field instances. Typically a single Document instance is re-used as well. This helps most on small documents.

Each Field instance should only be used once within a single Document instance. See ImproveIndexingSpeed for details.

to_string

String to_string ( )
Java: toString()

Prints a Field for human consumption.

token_stream

TokenStream token_stream ( Analyzer analyzer, TokenStream reuse )
Java: tokenStream(org.apache.lucene.analysis.Analyzer analyzer, org.apache.lucene.analysis.TokenStream reuse)

token_stream=

token_stream= ( TokenStream token_stream )
Java: setTokenStream(org.apache.lucene.analysis.TokenStream tokenStream) · also: set_token_stream

Expert: sets the token stream to be used for indexing.

token_stream_value

TokenStream token_stream_value ( )
Java: tokenStreamValue()

The TokenStream for this field to be used when indexing, or null. If null, the Reader value or String value is analyzed to produce the indexed tokens.

this work for additional information regarding copyright ownership.