## Uses of Class
org.apache.lucene.util.BytesRef

- Packages that use BytesRef
  Package | Description
  --- | ---
  org.apache.lucene.analysis | Text analysis.
  org.apache.lucene.analysis.tokenattributes | General-purpose attributes for text analysis.
  org.apache.lucene.codecs | Codecs API: API for customization of the encoding and structure of the index.
  org.apache.lucene.codecs.compressing | Compressing helper classes.
  org.apache.lucene.codecs.lucene90.blocktree | BlockTree terms dictionary.
  org.apache.lucene.codecs.lucene90.compressing | Lucene 9.0 compressing format.
  org.apache.lucene.codecs.lucene99 | Lucene 9.9 file format.
  org.apache.lucene.document | The logical representation of a `Document` for indexing and searching.
  org.apache.lucene.index | Code to maintain and access indices.
  org.apache.lucene.search | Code to search indices.
  org.apache.lucene.search.comparators | Comparators, used to compare hits so as to determine their sort order when collecting the top results with `TopFieldCollector`.
  org.apache.lucene.util | Some utility classes.
  org.apache.lucene.util.automaton | Finite-state automaton for regular expressions.
  org.apache.lucene.util.bkd | Block KD-tree, implementing the generic spatial data structure described in this paper.
  org.apache.lucene.util.fst | Finite state transducers

- - ### Uses of BytesRef in org.apache.lucene.analysis

    Methods in org.apache.lucene.analysis that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected BytesRef` | TokenStreamToAutomaton.`changeToken​(BytesRef in)` | Subclass and implement this if you need to change the token (such as escaping certain bytes) before it's turned into a graph.
    `BytesRef` | Analyzer.`normalize​(String fieldName, String text)` | Normalize a string down to the representation that it would have in the index.

    Methods in org.apache.lucene.analysis with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected BytesRef` | TokenStreamToAutomaton.`changeToken​(BytesRef in)` | Subclass and implement this if you need to change the token (such as escaping certain bytes) before it's turned into a graph.

  - ### Uses of BytesRef in org.apache.lucene.analysis.tokenattributes

    Methods in org.apache.lucene.analysis.tokenattributes that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | BytesTermAttributeImpl.`getBytesRef()` |
    `BytesRef` | CharTermAttributeImpl.`getBytesRef()` |
    `BytesRef` | TermToBytesRefAttribute.`getBytesRef()` | Retrieve this attribute's BytesRef.
    `BytesRef` | PayloadAttribute.`getPayload()` | Returns this Token's payload.
    `BytesRef` | PayloadAttributeImpl.`getPayload()` |

    Methods in org.apache.lucene.analysis.tokenattributes with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | BytesTermAttribute.`setBytesRef​(BytesRef bytes)` | Sets the `BytesRef` of the term
    `void` | BytesTermAttributeImpl.`setBytesRef​(BytesRef bytes)` |
    `void` | PayloadAttribute.`setPayload​(BytesRef payload)` | Sets this Token's payload.
    `void` | PayloadAttributeImpl.`setPayload​(BytesRef payload)` |

    Constructors in org.apache.lucene.analysis.tokenattributes with parameters of type BytesRef
    Constructor | Description
    --- | ---
    `PayloadAttributeImpl​(BytesRef payload)` | Initialize this attribute with the given payload.

  - ### Uses of BytesRef in org.apache.lucene.codecs

    Methods in org.apache.lucene.codecs with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract void` | PushPostingsWriterBase.`addPosition​(int position, BytesRef payload, int startOffset, int endOffset)` | Add a new position and payload, and start/end offset.
    `abstract void` | TermVectorsWriter.`addPosition​(int position, int startOffset, int endOffset, BytesRef payload)` | Adds a term position and offsets
    `abstract void` | MutablePointTree.`getValue​(int i, BytesRef packedValue)` | Set `packedValue` with a reference to the packed bytes of the i-th value.
    `abstract void` | TermVectorsWriter.`startTerm​(BytesRef term, int freq)` | Adds a term and its term frequency `freq`.
    `abstract void` | StoredFieldsWriter.`writeField​(FieldInfo info, BytesRef value)` | Writes a stored binary value.
    `abstract BlockTermState` | PostingsWriterBase.`writeTerm​(BytesRef term, TermsEnum termsEnum, FixedBitSet docsSeen, NormsProducer norms)` | Write all postings for one term; use the provided `TermsEnum` to pull a `PostingsEnum`.
    `BlockTermState` | PushPostingsWriterBase.`writeTerm​(BytesRef term, TermsEnum termsEnum, FixedBitSet docsSeen, NormsProducer norms)` |

  - ### Uses of BytesRef in org.apache.lucene.codecs.compressing

    Methods in org.apache.lucene.codecs.compressing with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract void` | Decompressor.`decompress​(DataInput in, int originalLength, int offset, int length, BytesRef bytes)` | Decompress bytes that were stored between offsets `offset` and `offset+length` in the original stream from the compressed stream `in` to `bytes` .

  - ### Uses of BytesRef in org.apache.lucene.codecs.lucene90.blocktree

    Methods in org.apache.lucene.codecs.lucene90.blocktree that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | FieldReader.`getMax()` |
    `BytesRef` | FieldReader.`getMin()` |

    Methods in org.apache.lucene.codecs.lucene90.blocktree with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `TermsEnum` | FieldReader.`intersect​(CompiledAutomaton compiled, BytesRef startTerm)` |

  - ### Uses of BytesRef in org.apache.lucene.codecs.lucene90.compressing

    Methods in org.apache.lucene.codecs.lucene90.compressing with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | Lucene90CompressingTermVectorsWriter.`addPosition​(int position, int startOffset, int endOffset, BytesRef payload)` |
    `void` | Lucene90CompressingTermVectorsWriter.`startTerm​(BytesRef term, int freq)` |
    `void` | Lucene90CompressingStoredFieldsWriter.`writeField​(FieldInfo info, BytesRef value)` |

  - ### Uses of BytesRef in org.apache.lucene.codecs.lucene99

    Methods in org.apache.lucene.codecs.lucene99 with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | Lucene99PostingsWriter.`addPosition​(int position, BytesRef payload, int startOffset, int endOffset)` |

  - ### Uses of BytesRef in org.apache.lucene.document

    Methods in org.apache.lucene.document that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | BinaryRangeDocValues.`binaryValue()` |
    `BytesRef` | DoubleField.`binaryValue()` |
    `BytesRef` | Field.`binaryValue()` |
    `BytesRef` | FloatField.`binaryValue()` |
    `BytesRef` | IntField.`binaryValue()` |
    `BytesRef` | KeywordField.`binaryValue()` |
    `BytesRef` | LongField.`binaryValue()` |
    `BytesRef` | StringField.`binaryValue()` |
    `BytesRef` | Document.`getBinaryValue​(String name)` | Returns an array of bytes for the first (or only) field that has the name specified as the method parameter.
    `BytesRef` | StoredValue.`getBinaryValue()` | Retrieve a binary value.
    `BytesRef[]` | Document.`getBinaryValues​(String name)` | Returns an array of byte arrays for of the fields that have the name specified as the method parameter.
    `static BytesRef` | DoublePoint.`pack​(double... point)` | Pack a double point into a BytesRef
    `static BytesRef` | FloatPoint.`pack​(float... point)` | Pack a float point into a BytesRef
    `static BytesRef` | IntPoint.`pack​(int... point)` | Pack an integer point into a BytesRef
    `static BytesRef` | LongPoint.`pack​(long... point)` | Pack a long point into a BytesRef

    Methods in org.apache.lucene.document with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `static LatLonShapeDocValuesField` | LatLonShape.`createDocValueField​(String fieldName, BytesRef binaryValue)` | create a `LatLonShapeDocValuesField` from an existing encoded representation
    `static XYShapeDocValuesField` | XYShape.`createDocValueField​(String fieldName, BytesRef binaryValue)` | create a `XYShapeDocValuesField` from an existing encoded representation
    `static LatLonShapeDocValues` | LatLonShape.`createLatLonShapeDocValues​(BytesRef bytesRef)` | Factory method for creating the `LatLonShapeDocValues`
    `static XYShapeDocValues` | XYShape.`createXYShapeDocValues​(BytesRef bytesRef)` | Factory method for creating the `XYShapeDocValues`
    `static Query` | KeywordField.`newExactQuery​(String field, BytesRef value)` | Create a query for matching an exact `BytesRef` value.
    `static Query` | KeywordField.`newSetQuery​(String field, BytesRef... values)` | Deprecated, for removal: This API element is subject to removal in a future version. Use `KeywordField.newSetQuery(String, Collection)` instead.
    `static Query` | SortedDocValuesField.`newSlowExactQuery​(String field, BytesRef value)` | Create a query for matching an exact `BytesRef` value.
    `static Query` | SortedSetDocValuesField.`newSlowExactQuery​(String field, BytesRef value)` | Create a query for matching an exact `BytesRef` value.
    `static Query` | SortedDocValuesField.`newSlowRangeQuery​(String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive)` | Create a range query that matches all documents whose value is between `lowerValue` and `upperValue` included.
    `static Query` | SortedSetDocValuesField.`newSlowRangeQuery​(String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive)` | Create a range query that matches all documents whose value is between `lowerValue` and `upperValue`.
    `static Query` | SortedDocValuesField.`newSlowSetQuery​(String field, BytesRef... values)` | Deprecated, for removal: This API element is subject to removal in a future version. Use `SortedDocValuesField.newSlowSetQuery(String, Collection)` instead.
    `static Query` | SortedSetDocValuesField.`newSlowSetQuery​(String field, BytesRef... values)` | Deprecated, for removal: This API element is subject to removal in a future version. Use `SortedSetDocValuesField.newSlowSetQuery(String, Collection)` instead.
    `void` | StoredValue.`setBinaryValue​(BytesRef value)` | Set a binary value.
    `void` | DoublePoint.`setBytesValue​(BytesRef bytes)` |
    `void` | Field.`setBytesValue​(BytesRef value)` | Expert: change the value of this field.
    `void` | FloatPoint.`setBytesValue​(BytesRef bytes)` |
    `void` | InetAddressPoint.`setBytesValue​(BytesRef bytes)` |
    `void` | IntPoint.`setBytesValue​(BytesRef bytes)` |
    `void` | KeywordField.`setBytesValue​(BytesRef value)` |
    `void` | LongPoint.`setBytesValue​(BytesRef bytes)` |
    `void` | StringField.`setBytesValue​(BytesRef value)` |
    `static void` | LongPoint.`unpack​(BytesRef bytesRef, int start, long[] buf)` | Unpack a BytesRef into a long point.

    Method parameters in org.apache.lucene.document with type arguments of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Query` | KeywordField.`newSetQuery​(String field, Collection<BytesRef> values)` | Create a query for matching any of a set of provided `BytesRef` values.
    `static Query` | SortedDocValuesField.`newSlowSetQuery​(String field, Collection<BytesRef> values)` | Create a query matching any of the specified values.
    `static Query` | SortedSetDocValuesField.`newSlowSetQuery​(String field, Collection<BytesRef> values)` | Create a query matching any of the specified values.

    Constructors in org.apache.lucene.document with parameters of type BytesRef
    Constructor | Description
    --- | ---
    `BinaryDocValuesField​(String name, BytesRef value)` | Create a new binary DocValues field.
    `Field​(String name, BytesRef bytes, IndexableFieldType type)` | Create field with binary value.
    `KeywordField​(String name, BytesRef value, Field.Store stored)` | Creates a new KeywordField.
    `LatLonShapeDocValues​(BytesRef binaryValue)` | protected ctor for instantiating a lat lon doc value based on an already retrieved binary format
    `LatLonShapeDocValuesField​(String name, BytesRef binaryValue)` | Creates a `LatLonShapeDocValueField` from a given serialized value
    `SortedDocValuesField​(String name, BytesRef bytes)` | Create a new sorted DocValues field.
    `SortedSetDocValuesField​(String name, BytesRef bytes)` | Create a new sorted DocValues field.
    `StoredField​(String name, BytesRef value)` | Create a stored-only field with the given binary value.
    `StoredField​(String name, BytesRef bytes, FieldType type)` | Expert: allows you to customize the `FieldType`.
    `StoredValue​(BytesRef value)` | Ctor for binary values.
    `StringField​(String name, BytesRef value, Field.Store stored)` | Creates a new binary StringField, indexing the provided binary (BytesRef) value as a single token.
    `XYShapeDocValues​(BytesRef binaryValue)` | protected ctor for instantiating a cartesian doc value based on an already retrieved binary format
    `XYShapeDocValuesField​(String name, BytesRef binaryValue)` | Creates a `XYShapeDocValueField` from a given serialized value

  - ### Uses of BytesRef in org.apache.lucene.index

    Fields in org.apache.lucene.index declared as BytesRef
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected BytesRef` | FilteredTermsEnum.`actualTerm` | Which term the enum is currently positioned to.

    Methods in org.apache.lucene.index that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract BytesRef` | BinaryDocValues.`binaryValue()` | Returns the binary value for the current document ID.
    `BytesRef` | FilterBinaryDocValues.`binaryValue()` |
    `BytesRef` | IndexableField.`binaryValue()` | Non-null if this field has a binary value
    `BytesRef` | Term.`bytes()` | Returns the bytes of this term, these should not be modified.
    `BytesRef` | ExitableDirectoryReader.ExitableTerms.`getMax()` |
    `BytesRef` | MultiTerms.`getMax()` |
    `BytesRef` | Terms.`getMax()` | Returns the largest term (in lexicographic order) in the field.
    `BytesRef` | ExitableDirectoryReader.ExitableTerms.`getMin()` |
    `BytesRef` | MultiTerms.`getMin()` |
    `BytesRef` | Terms.`getMin()` | Returns the smallest term (in lexicographic order) in the field.
    `BytesRef` | FilterLeafReader.FilterPostingsEnum.`getPayload()` |
    `BytesRef` | MultiPostingsEnum.`getPayload()` |
    `abstract BytesRef` | PostingsEnum.`getPayload()` | Returns the payload at this position, or null if no payload was indexed.
    `BytesRef` | SlowImpactsEnum.`getPayload()` |
    `BytesRef` | FilterSortedDocValues.`lookupOrd​(int ord)` |
    `BytesRef` | FilterSortedSetDocValues.`lookupOrd​(long ord)` |
    `BytesRef` | MultiDocValues.MultiSortedDocValues.`lookupOrd​(int ord)` |
    `BytesRef` | MultiDocValues.MultiSortedSetDocValues.`lookupOrd​(long ord)` |
    `abstract BytesRef` | SortedDocValues.`lookupOrd​(int ord)` | Retrieves the value for the specified ordinal.
    `abstract BytesRef` | SortedSetDocValues.`lookupOrd​(long ord)` | Retrieves the value for the specified ordinal.
    `BytesRef` | ExitableDirectoryReader.ExitableTermsEnum.`next()` |
    `BytesRef` | FilteredTermsEnum.`next()` |
    `BytesRef` | FilterLeafReader.FilterTermsEnum.`next()` |
    `BytesRef` | MultiTermsEnum.`next()` |
    `BytesRef` | PrefixCodedTerms.TermIterator.`next()` |
    `protected BytesRef` | AutomatonTermsEnum.`nextSeekTerm​(BytesRef term)` |
    `protected BytesRef` | FilteredTermsEnum.`nextSeekTerm​(BytesRef currentTerm)` | On the first call to `FilteredTermsEnum.next()` or if `FilteredTermsEnum.accept(org.apache.lucene.util.BytesRef)` returns `FilteredTermsEnum.AcceptStatus.YES_AND_SEEK` or `FilteredTermsEnum.AcceptStatus.NO_AND_SEEK`, this method will be called to eventually seek the underlying TermsEnum to a new position.
    `BytesRef` | FilteredTermsEnum.`term()` |
    `BytesRef` | FilterLeafReader.FilterTermsEnum.`term()` |
    `BytesRef` | MultiTermsEnum.`term()` |
    `abstract BytesRef` | TermsEnum.`term()` | Returns current term.

    Methods in org.apache.lucene.index with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected FilteredTermsEnum.AcceptStatus` | AutomatonTermsEnum.`accept​(BytesRef term)` | Returns true if the term matches the automaton.
    `protected abstract FilteredTermsEnum.AcceptStatus` | FilteredTermsEnum.`accept​(BytesRef term)` | Return if term is accepted, not accepted or the iteration should ended (and possibly seek).
    `protected FilteredTermsEnum.AcceptStatus` | SingleTermsEnum.`accept​(BytesRef term)` |
    `void` | PrefixCodedTerms.Builder.`add​(String field, BytesRef bytes)` | add a term.
    `static PostingsEnum` | MultiTerms.`getTermPostingsEnum​(IndexReader r, String field, BytesRef term)` | Returns `PostingsEnum` for the specified field and term.
    `static PostingsEnum` | MultiTerms.`getTermPostingsEnum​(IndexReader r, String field, BytesRef term, int flags)` | Returns `PostingsEnum` for the specified field and term, with control over whether freqs, positions, offsets or payloads are required.
    `TermsEnum` | ExitableDirectoryReader.ExitableTerms.`intersect​(CompiledAutomaton compiled, BytesRef startTerm)` |
    `TermsEnum` | MultiTerms.`intersect​(CompiledAutomaton compiled, BytesRef startTerm)` |
    `TermsEnum` | Terms.`intersect​(CompiledAutomaton compiled, BytesRef startTerm)` | Returns a TermsEnum that iterates over all terms and documents that are accepted by the provided `CompiledAutomaton`.
    `int` | FilterSortedDocValues.`lookupTerm​(BytesRef key)` |
    `long` | FilterSortedSetDocValues.`lookupTerm​(BytesRef key)` |
    `int` | SortedDocValues.`lookupTerm​(BytesRef key)` | If `key` exists, returns its ordinal, else returns `-insertionPoint-1`, like `Arrays.binarySearch`.
    `long` | SortedSetDocValues.`lookupTerm​(BytesRef key)` | If `key` exists, returns its ordinal, else returns `-insertionPoint-1`, like `Arrays.binarySearch`.
    `protected BytesRef` | AutomatonTermsEnum.`nextSeekTerm​(BytesRef term)` |
    `protected BytesRef` | FilteredTermsEnum.`nextSeekTerm​(BytesRef currentTerm)` | On the first call to `FilteredTermsEnum.next()` or if `FilteredTermsEnum.accept(org.apache.lucene.util.BytesRef)` returns `FilteredTermsEnum.AcceptStatus.YES_AND_SEEK` or `FilteredTermsEnum.AcceptStatus.NO_AND_SEEK`, this method will be called to eventually seek the underlying TermsEnum to a new position.
    `TermsEnum.SeekStatus` | FilteredTermsEnum.`seekCeil​(BytesRef term)` | This enum does not support seeking!
    `TermsEnum.SeekStatus` | FilterLeafReader.FilterTermsEnum.`seekCeil​(BytesRef text)` |
    `TermsEnum.SeekStatus` | MultiTermsEnum.`seekCeil​(BytesRef term)` |
    `abstract TermsEnum.SeekStatus` | TermsEnum.`seekCeil​(BytesRef text)` | Seeks to the specified term, if it exists, or to the next (ceiling) term.
    `boolean` | BaseTermsEnum.`seekExact​(BytesRef text)` |
    `void` | BaseTermsEnum.`seekExact​(BytesRef term, TermState state)` |
    `boolean` | FilteredTermsEnum.`seekExact​(BytesRef term)` | This enum does not support seeking!
    `void` | FilteredTermsEnum.`seekExact​(BytesRef term, TermState state)` | This enum does not support seeking!
    `boolean` | FilterLeafReader.FilterTermsEnum.`seekExact​(BytesRef text)` |
    `void` | FilterLeafReader.FilterTermsEnum.`seekExact​(BytesRef term, TermState state)` |
    `boolean` | MultiTermsEnum.`seekExact​(BytesRef term)` |
    `abstract boolean` | TermsEnum.`seekExact​(BytesRef text)` | Attempts to seek to the exact term, returning true if the term is found.
    `abstract void` | TermsEnum.`seekExact​(BytesRef term, TermState state)` | Expert: Seeks a specific position by `TermState` previously obtained from `TermsEnum.termState()`.
    `protected void` | FilteredTermsEnum.`setInitialSeekTerm​(BytesRef term)` | Use this method to set the initial `BytesRef` to seek before iterating.
    `static String` | Term.`toString​(BytesRef termText)` | Returns human-readable form of the term text.
    `long` | IndexWriter.`updateBinaryDocValue​(Term term, String field, BytesRef value)` | Updates a document's `BinaryDocValues` for `field` to the given `value` .

    Constructors in org.apache.lucene.index with parameters of type BytesRef
    Constructor | Description
    --- | ---
    `SingleTermsEnum​(TermsEnum tenum, BytesRef termText)` | Creates a new `SingleTermsEnum`.
    `Term​(String fld, BytesRef bytes)` | Constructs a Term with the given field and bytes.

  - ### Uses of BytesRef in org.apache.lucene.search

    Methods in org.apache.lucene.search that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | MaxNonCompetitiveBoostAttribute.`getCompetitiveTerm()` | This is the term or `null` of the term that triggered the boost change.
    `BytesRef` | MaxNonCompetitiveBoostAttributeImpl.`getCompetitiveTerm()` |
    `BytesRef` | TermRangeQuery.`getLowerTerm()` | Returns the lower value of this range query
    `BytesRef` | MultiPhraseQuery.UnionFullPostingsEnum.`getPayload()` |
    `BytesRef` | MultiPhraseQuery.UnionPostingsEnum.`getPayload()` |
    `BytesRef` | TermRangeQuery.`getUpperTerm()` | Returns the upper value of this range query
    `BytesRef` | FuzzyTermsEnum.`next()` |
    `abstract BytesRef` | PointInSetQuery.Stream.`next()` |
    `BytesRef` | FuzzyTermsEnum.`term()` |
    `BytesRef` | TermStatistics.`term()` | The term text.
    `BytesRef` | FieldComparator.TermValComparator.`value​(int slot)` |

    Methods in org.apache.lucene.search that return types with arguments of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `Comparator<BytesRef>` | SortField.`getBytesComparator()` |

    Methods in org.apache.lucene.search with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `SynonymQuery.Builder` | SynonymQuery.Builder.`addTerm​(BytesRef term, float boost)` | Adds the provided `term` as a synonym, document frequencies of this term will be boosted by `boost`.
    `int` | FieldComparator.TermValComparator.`compareValues​(BytesRef val1, BytesRef val2)` |
    `TermsEnum.SeekStatus` | FuzzyTermsEnum.`seekCeil​(BytesRef text)` |
    `boolean` | FuzzyTermsEnum.`seekExact​(BytesRef text)` |
    `void` | FuzzyTermsEnum.`seekExact​(BytesRef term, TermState state)` |
    `void` | MaxNonCompetitiveBoostAttribute.`setCompetitiveTerm​(BytesRef competitiveTerm)` | This is the term or `null` of the term that triggered the boost change.
    `void` | MaxNonCompetitiveBoostAttributeImpl.`setCompetitiveTerm​(BytesRef competitiveTerm)` |
    `void` | FieldComparator.TermValComparator.`setTopValue​(BytesRef value)` |
    `static Automaton` | PrefixQuery.`toAutomaton​(BytesRef prefix)` | Build an automaton accepting all terms with the specified prefix.
    `static Automaton` | TermRangeQuery.`toAutomaton​(BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper)` |

    Method parameters in org.apache.lucene.search with type arguments of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | SortField.`setBytesComparator​(Comparator<BytesRef> b)` |

    Constructors in org.apache.lucene.search with parameters of type BytesRef
    Constructor | Description
    --- | ---
    `PhraseQuery​(int slop, String field, BytesRef... terms)` | Create a phrase query which will match documents that contain the given list of terms at consecutive positions in `field`, and at a maximum edit distance of `slop`.
    `PhraseQuery​(String field, BytesRef... terms)` | Create a phrase query which will match documents that contain the given list of terms at consecutive positions in `field`.
    `TermInSetQuery​(String field, BytesRef... terms)` | Deprecated. Use `TermInSetQuery(String, Collection)` instead.
    `TermInSetQuery​(MultiTermQuery.RewriteMethod rewriteMethod, String field, BytesRef... terms)` | Deprecated. Use `TermInSetQuery(RewriteMethod, String, Collection)` instead.
    `TermRangeQuery​(String field, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper)` | Constructs a query selecting all terms greater/equal than `lowerTerm` but less/equal than `upperTerm`.
    `TermRangeQuery​(String field, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper, MultiTermQuery.RewriteMethod rewriteMethod)` | Constructs a query selecting all terms greater/equal than `lowerTerm` but less/equal than `upperTerm`.
    `TermStatistics​(BytesRef term, long docFreq, long totalTermFreq)` | Creates statistics instance for a term.

    Constructor parameters in org.apache.lucene.search with type arguments of type BytesRef
    Constructor | Description
    --- | ---
    `TermInSetQuery​(String field, Collection<BytesRef> terms)` |
    `TermInSetQuery​(MultiTermQuery.RewriteMethod rewriteMethod, String field, Collection<BytesRef> terms)` | Creates a new `TermInSetQuery` from the given collection of terms.

  - ### Uses of BytesRef in org.apache.lucene.search.comparators

    Methods in org.apache.lucene.search.comparators that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | TermOrdValComparator.`value​(int slot)` |

    Methods in org.apache.lucene.search.comparators with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | TermOrdValComparator.`compareValues​(BytesRef val1, BytesRef val2)` |
    `void` | TermOrdValComparator.`setTopValue​(BytesRef value)` |

  - ### Uses of BytesRef in org.apache.lucene.util

    Fields in org.apache.lucene.util declared as BytesRef
    Modifier and Type | Field | Description
    --- | --- | ---
    `static BytesRef` | UnicodeUtil.`BIG_TERM` | A binary term consisting of a number of 0xff bytes, likely to be bigger than other terms (e.g.
    `protected BytesRef` | StringSorter.`pivot` |
    `protected BytesRef` | StringSorter.`scratchBytes1` |
    `protected BytesRef` | StringSorter.`scratchBytes2` |
    `BytesRef` | QueryBuilder.TermAndBoost.`term` | the term

    Fields in org.apache.lucene.util with type parameters of type BytesRef
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Comparator<BytesRef>` | OfflineSorter.`DEFAULT_COMPARATOR` | Default comparator: sorts in binary (codepoint) order

    Methods in org.apache.lucene.util that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | BytesRef.`clone()` | Returns a shallow clone of this instance (the underlying bytes are not copied and will be shared by both the returned object and this object.
    `static BytesRef` | BytesRef.`deepCopyOf​(BytesRef other)` | Creates a new BytesRef that points to a copy of the bytes from `other`
    `BytesRef` | BytesRefArray.`get​(BytesRefBuilder spare, int index)` | Returns the n'th element of this `BytesRefArray`
    `BytesRef` | BytesRefBuilder.`get()` | Return a `BytesRef` that points to the internal content of this builder.
    `BytesRef` | BytesRefHash.`get​(int bytesID, BytesRef ref)` | Populates and returns a `BytesRef` with the bytes for the given bytesID.
    `BytesRef` | TermAndVector.`getTerm()` |
    `static BytesRef` | StringHelper.`intsRefToBytesRef​(IntsRef ints)` | Just converts each int in the incoming `IntsRef` to each byte in the returned `BytesRef`, throwing `IllegalArgumentException` if any int value is out of bounds for a byte.
    `BytesRef` | BytesRefIterator.`next()` | Increments the iteration to the next `BytesRef` in the iterator.
    `BytesRef` | OfflineSorter.ByteSequencesReader.`next()` | Reads the next entry into the provided `BytesRef`.
    `BytesRef` | BytesRefBuilder.`toBytesRef()` | Build a new `BytesRef` that has the same content as this buffer.

    Methods in org.apache.lucene.util that return types with arguments of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `Comparator<BytesRef>` | OfflineSorter.`getComparator()` | Returns the comparator in use to sort entries

    Methods in org.apache.lucene.util with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | BytesRefHash.`add​(BytesRef bytes)` | Adds a new `BytesRef`
    `int` | BytesRefBlockPool.`addBytesRef​(BytesRef bytes)` | Add a term returning the start position on the underlying `ByteBlockPool`.
    `void` | ByteBlockPool.`append​(BytesRef bytes)` | Appends the bytes in the provided `BytesRef` at the current position.
    `int` | BytesRefArray.`append​(BytesRef bytes)` | Appends a copy of the given `BytesRef` to this `BytesRefArray`.
    `void` | BytesRefBuilder.`append​(BytesRef ref)` | Append the provided bytes to this builder.
    `protected abstract int` | BytesRefComparator.`byteAt​(BytesRef ref, int i)` | Return the unsigned byte to use for comparison at index `i`, or `-1` if all bytes that are useful for comparisons are exhausted.
    `static int` | StringHelper.`bytesDifference​(BytesRef priorTerm, BytesRef currentTerm)` | Compares two `BytesRef`, element by element, and returns the number of elements common to both arrays (from the start of each).
    `boolean` | BytesRef.`bytesEquals​(BytesRef other)` | Expert: compares the bytes against another BytesRef, returning true if the bytes are equal.
    `static int` | UnicodeUtil.`codePointCount​(BytesRef utf8)` | Returns the number of code points in this UTF8 sequence.
    `int` | BytesRefComparator.`compare​(BytesRef o1, BytesRef o2)` |
    `int` | BytesRefComparator.`compare​(BytesRef o1, BytesRef o2, int k)` | Compare two bytes refs that first k bytes are already guaranteed to be equal.
    `int` | BytesRef.`compareTo​(BytesRef other)` | Unsigned byte order comparison
    `void` | PagedBytes.`copy​(BytesRef bytes, BytesRef out)` | Copy BytesRef in, setting BytesRef out to the result.
    `void` | BytesRefBuilder.`copyBytes​(BytesRef ref)` | Replace the content of this builder with the provided bytes.
    `long` | PagedBytes.`copyUsingLengthPrefix​(BytesRef bytes)` | Copy bytes in, writing the length as a 1 or 2 byte vInt prefix.
    `void` | CharsRefBuilder.`copyUTF8Bytes​(BytesRef bytes)` | Copy the provided bytes, interpreted as UTF-8 bytes.
    `void` | IntsRefBuilder.`copyUTF8Bytes​(BytesRef bytes)` | Copy the given UTF-8 bytes into this builder.
    `static BytesRef` | BytesRef.`deepCopyOf​(BytesRef other)` | Creates a new BytesRef that points to a copy of the bytes from `other`
    `static boolean` | StringHelper.`endsWith​(BytesRef ref, BytesRef suffix)` | Returns `true` iff the ref ends with the given suffix.
    `void` | PagedBytes.Reader.`fill​(BytesRef b, long start)` | Reads length as 1 or 2 byte vInt prefix, starting at start.
    `void` | BytesRefBlockPool.`fillBytesRef​(BytesRef term, int start)` | Populates the given BytesRef with the term starting at start.
    `void` | PagedBytes.Reader.`fillSlice​(BytesRef b, long start, int length)` | Gets a slice out of `PagedBytes` starting at start with a given length.
    `int` | BytesRefHash.`find​(BytesRef bytes)` | Returns the id of the given `BytesRef`.
    `BytesRef` | BytesRefHash.`get​(int bytesID, BytesRef ref)` | Populates and returns a `BytesRef` with the bytes for the given bytesID.
    `protected abstract void` | StringSorter.`get​(BytesRefBuilder builder, BytesRef result, int i)` |
    `static int` | StringHelper.`murmurhash3_x86_32​(BytesRef bytes, int seed)` |
    `static int` | StringHelper.`sortKeyLength​(BytesRef priorTerm, BytesRef currentTerm)` | Returns the length of `currentTerm` needed for use as a sort key.
    `static boolean` | StringHelper.`startsWith​(byte[] ref, BytesRef prefix)` | Returns `true` iff the ref starts with the given prefix.
    `static boolean` | StringHelper.`startsWith​(BytesRef ref, BytesRef prefix)` | Returns `true` iff the ref starts with the given prefix.
    `static int` | UnicodeUtil.`UTF8toUTF16​(BytesRef bytesRef, char[] chars)` | Utility method for `UnicodeUtil.UTF8toUTF16(byte[], int, int, char[])`
    `static int` | UnicodeUtil.`UTF8toUTF32​(BytesRef utf8, int[] ints)` | This method assumes valid UTF8 input.
    `void` | OfflineSorter.ByteSequencesWriter.`write​(BytesRef ref)` | Writes a BytesRef.

    Method parameters in org.apache.lucene.util with type arguments of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected Sorter` | StringSorter.`fallbackSorter​(Comparator<BytesRef> cmp)` |
    `BytesRefIterator` | BytesRefArray.`iterator​(Comparator<BytesRef> comp)` | Returns a `BytesRefIterator` with point in time semantics.
    `BytesRefArray.SortState` | BytesRefArray.`sort​(Comparator<BytesRef> comp, boolean stable)` | Returns a `BytesRefArray.SortState` representing the order of elements in this array.

    Constructors in org.apache.lucene.util with parameters of type BytesRef
    Constructor | Description
    --- | ---
    `TermAndBoost​(BytesRef term, float boost)` | Creates a new TermAndBoost
    `TermAndVector​(BytesRef term, float[] vector)` |

    Constructor parameters in org.apache.lucene.util with type arguments of type BytesRef
    Constructor | Description
    --- | ---
    `OfflineSorter​(Directory dir, String tempFileNamePrefix, Comparator<BytesRef> comparator)` | Defaults constructor with a custom comparator.
    `OfflineSorter​(Directory dir, String tempFileNamePrefix, Comparator<BytesRef> comparator, OfflineSorter.BufferSize ramBufferSize, int maxTempfiles, int valueLength, ExecutorService exec, int maxPartitionsInRAM)` | All-details constructor.
    `StringSorter​(Comparator<BytesRef> cmp)` |

  - ### Uses of BytesRef in org.apache.lucene.util.automaton

    Fields in org.apache.lucene.util.automaton declared as BytesRef
    Modifier and Type | Field | Description
    --- | --- | ---
    `BytesRef` | CompiledAutomaton.`commonSuffixRef` | Shared common suffix accepted by the automaton.
    `BytesRef` | CompiledAutomaton.`term` | For `CompiledAutomaton.AUTOMATON_TYPE.SINGLE` this is the singleton term.

    Methods in org.apache.lucene.util.automaton that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | CompiledAutomaton.`floor​(BytesRef input, BytesRefBuilder output)` | Finds largest term accepted by this Automaton, that's <= the provided input term.
    `static BytesRef` | Operations.`getCommonPrefixBytesRef​(Automaton a)` | Returns the longest BytesRef that is a prefix of all accepted strings and visits each state at most once.
    `static BytesRef` | Operations.`getCommonSuffixBytesRef​(Automaton a)` | Returns the longest BytesRef that is a suffix of all accepted strings.

    Methods in org.apache.lucene.util.automaton with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | CompiledAutomaton.`floor​(BytesRef input, BytesRefBuilder output)` | Finds largest term accepted by this Automaton, that's <= the provided input term.
    `static Automaton` | Automata.`makeBinary​(BytesRef term)` | Returns a new (deterministic) automaton that accepts the single given binary term.
    `static Automaton` | Automata.`makeBinaryInterval​(BytesRef min, boolean minInclusive, BytesRef max, boolean maxInclusive)` | Creates a new deterministic, minimal automaton accepting all binary terms in the specified interval.

    Method parameters in org.apache.lucene.util.automaton with type arguments of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Automaton` | DaciukMihovAutomatonBuilder.`build​(Iterable<BytesRef> input)` | Deprecated. Please see `Automata.makeStringUnion(Iterable)` instead
    `static Automaton` | Automata.`makeBinaryStringUnion​(Iterable<BytesRef> utf8Strings)` | Returns a new (deterministic and minimal) automaton that accepts the union of the given collection of `BytesRef`s representing UTF-8 encoded strings.
    `static Automaton` | Automata.`makeStringUnion​(Iterable<BytesRef> utf8Strings)` | Returns a new (deterministic and minimal) automaton that accepts the union of the given collection of `BytesRef`s representing UTF-8 encoded strings.

  - ### Uses of BytesRef in org.apache.lucene.util.bkd

    Methods in org.apache.lucene.util.bkd that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | PointValue.`packedValue()` | Returns the packed values for the dimensions
    `BytesRef` | PointValue.`packedValueDocIDBytes()` | Returns the byte representation of the packed value together with the docID

    Methods in org.apache.lucene.util.bkd with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | MutablePointTreeReaderUtils.`partition​(BKDConfig config, int maxDoc, int splitDim, int commonPrefixLen, MutablePointTree reader, int from, int to, int mid, BytesRef scratch1, BytesRef scratch2)` | Partition points around `mid`.
    `static void` | MutablePointTreeReaderUtils.`sortByDim​(BKDConfig config, int sortedDim, int[] commonPrefixLengths, MutablePointTree reader, int from, int to, BytesRef scratch1, BytesRef scratch2)` | Sort points on the given dimension.

  - ### Uses of BytesRef in org.apache.lucene.util.fst

    Fields in org.apache.lucene.util.fst declared as BytesRef
    Modifier and Type | Field | Description
    --- | --- | ---
    `BytesRef` | BytesRefFSTEnum.InputOutput.`input` |

    Methods in org.apache.lucene.util.fst that return BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | ByteSequenceOutputs.`add​(BytesRef prefix, BytesRef output)` |
    `BytesRef` | ByteSequenceOutputs.`common​(BytesRef output1, BytesRef output2)` |
    `BytesRef` | ByteSequenceOutputs.`getNoOutput()` |
    `BytesRef` | ByteSequenceOutputs.`read​(DataInput in)` |
    `BytesRef` | ByteSequenceOutputs.`subtract​(BytesRef output, BytesRef inc)` |
    `static BytesRef` | Util.`toBytesRef​(IntsRef input, BytesRefBuilder scratch)` | Just converts IntsRef to BytesRef; you must ensure the int values fit into a byte.

    Methods in org.apache.lucene.util.fst with parameters of type BytesRef
    Modifier and Type | Method | Description
    --- | --- | ---
    `BytesRef` | ByteSequenceOutputs.`add​(BytesRef prefix, BytesRef output)` |
    `BytesRef` | ByteSequenceOutputs.`common​(BytesRef output1, BytesRef output2)` |
    `static <T> T` | Util.`get​(FST<T> fst, BytesRef input)` | Looks up the output for this input, or null if the input is not accepted
    `String` | ByteSequenceOutputs.`outputToString​(BytesRef output)` |
    `long` | ByteSequenceOutputs.`ramBytesUsed​(BytesRef output)` |
    `BytesRefFSTEnum.InputOutput<T>` | BytesRefFSTEnum.`seekCeil​(BytesRef target)` | Seeks to smallest term that's >= target.
    `BytesRefFSTEnum.InputOutput<T>` | BytesRefFSTEnum.`seekExact​(BytesRef target)` | Seeks to exactly this term, returning null if the term doesn't exist.
    `BytesRefFSTEnum.InputOutput<T>` | BytesRefFSTEnum.`seekFloor​(BytesRef target)` | Seeks to biggest term that's <= target.
    `BytesRef` | ByteSequenceOutputs.`subtract​(BytesRef output, BytesRef inc)` |
    `static IntsRef` | Util.`toIntsRef​(BytesRef input, IntsRefBuilder scratch)` | Just takes unsigned byte values from the BytesRef and converts into an IntsRef.
    `void` | ByteSequenceOutputs.`write​(BytesRef prefix, DataOutput out)` |