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.lucene912 Lucene 9.12 file format.org.apache.lucene.document The logical representation of aDocumentfor 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 withTopFieldCollector.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 BytesRefTokenStreamToAutomaton. 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.BytesRefAnalyzer. 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 BytesRefTokenStreamToAutomaton. 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 BytesRefBytesTermAttributeImpl. getBytesRef()BytesRefCharTermAttributeImpl. getBytesRef()BytesRefTermToBytesRefAttribute. getBytesRef()Retrieve this attribute's BytesRef.BytesRefPayloadAttribute. getPayload()Returns this Token's payload.BytesRefPayloadAttributeImpl. getPayload()Methods in org.apache.lucene.analysis.tokenattributes with parameters of type BytesRef Modifier and Type Method Description voidBytesTermAttribute. setBytesRef(BytesRef bytes)Sets theBytesRefof the termvoidBytesTermAttributeImpl. setBytesRef(BytesRef bytes)voidPayloadAttribute. setPayload(BytesRef payload)Sets this Token's payload.voidPayloadAttributeImpl. 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 voidPushPostingsWriterBase. addPosition(int position, BytesRef payload, int startOffset, int endOffset)Add a new position and payload, and start/end offset.abstract voidTermVectorsWriter. addPosition(int position, int startOffset, int endOffset, BytesRef payload)Adds a term position and offsetsabstract voidMutablePointTree. getValue(int i, BytesRef packedValue)SetpackedValuewith a reference to the packed bytes of the i-th value.abstract voidTermVectorsWriter. startTerm(BytesRef term, int freq)Adds a term and its term frequencyfreq.abstract voidStoredFieldsWriter. writeField(FieldInfo info, BytesRef value)Writes a stored binary value.abstract BlockTermStatePostingsWriterBase. writeTerm(BytesRef term, TermsEnum termsEnum, FixedBitSet docsSeen, NormsProducer norms)Write all postings for one term; use the providedTermsEnumto pull aPostingsEnum.BlockTermStatePushPostingsWriterBase. 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 voidDecompressor. decompress(DataInput in, int originalLength, int offset, int length, BytesRef bytes)Decompress bytes that were stored between offsetsoffsetandoffset+lengthin the original stream from the compressed streamintobytes. -
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 BytesRefFieldReader. getMax()BytesRefFieldReader. getMin()Methods in org.apache.lucene.codecs.lucene90.blocktree with parameters of type BytesRef Modifier and Type Method Description TermsEnumFieldReader. 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 voidLucene90CompressingTermVectorsWriter. addPosition(int position, int startOffset, int endOffset, BytesRef payload)voidLucene90CompressingTermVectorsWriter. startTerm(BytesRef term, int freq)voidLucene90CompressingStoredFieldsWriter. writeField(FieldInfo info, BytesRef value) -
Uses of BytesRef in org.apache.lucene.codecs.lucene912
Methods in org.apache.lucene.codecs.lucene912 with parameters of type BytesRef Modifier and Type Method Description voidLucene912PostingsWriter. 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 BytesRefBinaryRangeDocValues. binaryValue()BytesRefDoubleField. binaryValue()BytesRefField. binaryValue()BytesRefFloatField. binaryValue()BytesRefIntField. binaryValue()BytesRefKeywordField. binaryValue()BytesRefLongField. binaryValue()BytesRefStringField. binaryValue()BytesRefDocument. getBinaryValue(String name)Returns an array of bytes for the first (or only) field that has the name specified as the method parameter.BytesRefStoredValue. 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 BytesRefDoublePoint. pack(double... point)Pack a double point into a BytesRefstatic BytesRefFloatPoint. pack(float... point)Pack a float point into a BytesRefstatic BytesRefIntPoint. pack(int... point)Pack an integer point into a BytesRefstatic BytesRefLongPoint. pack(long... point)Pack a long point into a BytesRefMethods in org.apache.lucene.document with parameters of type BytesRef Modifier and Type Method Description static LatLonShapeDocValuesFieldLatLonShape. createDocValueField(String fieldName, BytesRef binaryValue)create aLatLonShapeDocValuesFieldfrom an existing encoded representationstatic XYShapeDocValuesFieldXYShape. createDocValueField(String fieldName, BytesRef binaryValue)create aXYShapeDocValuesFieldfrom an existing encoded representationstatic LatLonShapeDocValuesLatLonShape. createLatLonShapeDocValues(BytesRef bytesRef)Factory method for creating theLatLonShapeDocValuesstatic XYShapeDocValuesXYShape. createXYShapeDocValues(BytesRef bytesRef)Factory method for creating theXYShapeDocValuesstatic QueryKeywordField. newExactQuery(String field, BytesRef value)Create a query for matching an exactBytesRefvalue.static QueryKeywordField. newSetQuery(String field, BytesRef... values)Deprecated, for removal: This API element is subject to removal in a future version.UseKeywordField.newSetQuery(String, Collection)instead.static QuerySortedDocValuesField. newSlowExactQuery(String field, BytesRef value)Create a query for matching an exactBytesRefvalue.static QuerySortedSetDocValuesField. newSlowExactQuery(String field, BytesRef value)Create a query for matching an exactBytesRefvalue.static QuerySortedDocValuesField. newSlowRangeQuery(String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive)Create a range query that matches all documents whose value is betweenlowerValueandupperValueincluded.static QuerySortedSetDocValuesField. newSlowRangeQuery(String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive)Create a range query that matches all documents whose value is betweenlowerValueandupperValue.static QuerySortedDocValuesField. newSlowSetQuery(String field, BytesRef... values)Deprecated, for removal: This API element is subject to removal in a future version.static QuerySortedSetDocValuesField. newSlowSetQuery(String field, BytesRef... values)Deprecated, for removal: This API element is subject to removal in a future version.voidStoredValue. setBinaryValue(BytesRef value)Set a binary value.voidDoublePoint. setBytesValue(BytesRef bytes)voidField. setBytesValue(BytesRef value)Expert: change the value of this field.voidFloatPoint. setBytesValue(BytesRef bytes)voidInetAddressPoint. setBytesValue(BytesRef bytes)voidIntPoint. setBytesValue(BytesRef bytes)voidKeywordField. setBytesValue(BytesRef value)voidLongPoint. setBytesValue(BytesRef bytes)voidStringField. setBytesValue(BytesRef value)static voidLongPoint. 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 QueryKeywordField. newSetQuery(String field, Collection<BytesRef> values)Create a query for matching any of a set of providedBytesRefvalues.static QuerySortedDocValuesField. newSlowSetQuery(String field, Collection<BytesRef> values)Create a query matching any of the specified values.static QuerySortedSetDocValuesField. 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 formatLatLonShapeDocValuesField(String name, BytesRef binaryValue)Creates aLatLonShapeDocValueFieldfrom a given serialized valueSortedDocValuesField(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 theFieldType.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 formatXYShapeDocValuesField(String name, BytesRef binaryValue)Creates aXYShapeDocValueFieldfrom 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 BytesRefFilteredTermsEnum. actualTermWhich term the enum is currently positioned to.Methods in org.apache.lucene.index that return BytesRef Modifier and Type Method Description abstract BytesRefBinaryDocValues. binaryValue()Returns the binary value for the current document ID.BytesRefFilterBinaryDocValues. binaryValue()BytesRefIndexableField. binaryValue()Non-null if this field has a binary valueBytesRefTerm. bytes()Returns the bytes of this term, these should not be modified.BytesRefExitableDirectoryReader.ExitableTerms. getMax()BytesRefMultiTerms. getMax()BytesRefTerms. getMax()Returns the largest term (in lexicographic order) in the field.BytesRefExitableDirectoryReader.ExitableTerms. getMin()BytesRefMultiTerms. getMin()BytesRefTerms. getMin()Returns the smallest term (in lexicographic order) in the field.BytesRefFilterLeafReader.FilterPostingsEnum. getPayload()BytesRefMultiPostingsEnum. getPayload()abstract BytesRefPostingsEnum. getPayload()Returns the payload at this position, or null if no payload was indexed.BytesRefSlowImpactsEnum. getPayload()BytesRefFilterSortedDocValues. lookupOrd(int ord)BytesRefFilterSortedSetDocValues. lookupOrd(long ord)BytesRefMultiDocValues.MultiSortedDocValues. lookupOrd(int ord)BytesRefMultiDocValues.MultiSortedSetDocValues. lookupOrd(long ord)abstract BytesRefSortedDocValues. lookupOrd(int ord)Retrieves the value for the specified ordinal.abstract BytesRefSortedSetDocValues. lookupOrd(long ord)Retrieves the value for the specified ordinal.BytesRefExitableDirectoryReader.ExitableTermsEnum. next()BytesRefFilteredTermsEnum. next()BytesRefFilterLeafReader.FilterTermsEnum. next()BytesRefMultiTermsEnum. next()BytesRefPrefixCodedTerms.TermIterator. next()protected BytesRefAutomatonTermsEnum. nextSeekTerm(BytesRef term)protected BytesRefFilteredTermsEnum. nextSeekTerm(BytesRef currentTerm)On the first call toFilteredTermsEnum.next()or ifFilteredTermsEnum.accept(org.apache.lucene.util.BytesRef)returnsFilteredTermsEnum.AcceptStatus.YES_AND_SEEKorFilteredTermsEnum.AcceptStatus.NO_AND_SEEK, this method will be called to eventually seek the underlying TermsEnum to a new position.BytesRefFilteredTermsEnum. term()BytesRefFilterLeafReader.FilterTermsEnum. term()BytesRefMultiTermsEnum. term()abstract BytesRefTermsEnum. term()Returns current term.Methods in org.apache.lucene.index with parameters of type BytesRef Modifier and Type Method Description protected FilteredTermsEnum.AcceptStatusAutomatonTermsEnum. accept(BytesRef term)Returns true if the term matches the automaton.protected abstract FilteredTermsEnum.AcceptStatusFilteredTermsEnum. accept(BytesRef term)Return if term is accepted, not accepted or the iteration should ended (and possibly seek).protected FilteredTermsEnum.AcceptStatusSingleTermsEnum. accept(BytesRef term)voidPrefixCodedTerms.Builder. add(String field, BytesRef bytes)add a term.static PostingsEnumMultiTerms. getTermPostingsEnum(IndexReader r, String field, BytesRef term)ReturnsPostingsEnumfor the specified field and term.static PostingsEnumMultiTerms. getTermPostingsEnum(IndexReader r, String field, BytesRef term, int flags)ReturnsPostingsEnumfor the specified field and term, with control over whether freqs, positions, offsets or payloads are required.TermsEnumExitableDirectoryReader.ExitableTerms. intersect(CompiledAutomaton compiled, BytesRef startTerm)TermsEnumMultiTerms. intersect(CompiledAutomaton compiled, BytesRef startTerm)TermsEnumTerms. intersect(CompiledAutomaton compiled, BytesRef startTerm)Returns a TermsEnum that iterates over all terms and documents that are accepted by the providedCompiledAutomaton.intFilterSortedDocValues. lookupTerm(BytesRef key)longFilterSortedSetDocValues. lookupTerm(BytesRef key)intSortedDocValues. lookupTerm(BytesRef key)Ifkeyexists, returns its ordinal, else returns-insertionPoint-1, likeArrays.binarySearch.longSortedSetDocValues. lookupTerm(BytesRef key)Ifkeyexists, returns its ordinal, else returns-insertionPoint-1, likeArrays.binarySearch.protected BytesRefAutomatonTermsEnum. nextSeekTerm(BytesRef term)protected BytesRefFilteredTermsEnum. nextSeekTerm(BytesRef currentTerm)On the first call toFilteredTermsEnum.next()or ifFilteredTermsEnum.accept(org.apache.lucene.util.BytesRef)returnsFilteredTermsEnum.AcceptStatus.YES_AND_SEEKorFilteredTermsEnum.AcceptStatus.NO_AND_SEEK, this method will be called to eventually seek the underlying TermsEnum to a new position.TermsEnum.SeekStatusFilteredTermsEnum. seekCeil(BytesRef term)This enum does not support seeking!TermsEnum.SeekStatusFilterLeafReader.FilterTermsEnum. seekCeil(BytesRef text)TermsEnum.SeekStatusMultiTermsEnum. seekCeil(BytesRef term)abstract TermsEnum.SeekStatusTermsEnum. seekCeil(BytesRef text)Seeks to the specified term, if it exists, or to the next (ceiling) term.booleanBaseTermsEnum. seekExact(BytesRef text)voidBaseTermsEnum. seekExact(BytesRef term, TermState state)booleanFilteredTermsEnum. seekExact(BytesRef term)This enum does not support seeking!voidFilteredTermsEnum. seekExact(BytesRef term, TermState state)This enum does not support seeking!booleanFilterLeafReader.FilterTermsEnum. seekExact(BytesRef text)voidFilterLeafReader.FilterTermsEnum. seekExact(BytesRef term, TermState state)booleanMultiTermsEnum. seekExact(BytesRef term)abstract booleanTermsEnum. seekExact(BytesRef text)Attempts to seek to the exact term, returning true if the term is found.abstract voidTermsEnum. seekExact(BytesRef term, TermState state)Expert: Seeks a specific position byTermStatepreviously obtained fromTermsEnum.termState().protected voidFilteredTermsEnum. setInitialSeekTerm(BytesRef term)Use this method to set the initialBytesRefto seek before iterating.static StringTerm. toString(BytesRef termText)Returns human-readable form of the term text.longIndexWriter. updateBinaryDocValue(Term term, String field, BytesRef value)Constructors in org.apache.lucene.index with parameters of type BytesRef Constructor Description SingleTermsEnum(TermsEnum tenum, BytesRef termText)Creates a newSingleTermsEnum.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 BytesRefMaxNonCompetitiveBoostAttribute. getCompetitiveTerm()This is the term ornullof the term that triggered the boost change.BytesRefMaxNonCompetitiveBoostAttributeImpl. getCompetitiveTerm()BytesRefTermRangeQuery. getLowerTerm()Returns the lower value of this range queryBytesRefMultiPhraseQuery.UnionFullPostingsEnum. getPayload()BytesRefMultiPhraseQuery.UnionPostingsEnum. getPayload()BytesRefTermRangeQuery. getUpperTerm()Returns the upper value of this range queryBytesRefFuzzyTermsEnum. next()abstract BytesRefPointInSetQuery.Stream. next()BytesRefFuzzyTermsEnum. term()BytesRefTermStatistics. term()The term text.BytesRefFieldComparator.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.BuilderSynonymQuery.Builder. addTerm(BytesRef term, float boost)Adds the providedtermas a synonym, document frequencies of this term will be boosted byboost.intFieldComparator.TermValComparator. compareValues(BytesRef val1, BytesRef val2)TermsEnum.SeekStatusFuzzyTermsEnum. seekCeil(BytesRef text)booleanFuzzyTermsEnum. seekExact(BytesRef text)voidFuzzyTermsEnum. seekExact(BytesRef term, TermState state)voidMaxNonCompetitiveBoostAttribute. setCompetitiveTerm(BytesRef competitiveTerm)This is the term ornullof the term that triggered the boost change.voidMaxNonCompetitiveBoostAttributeImpl. setCompetitiveTerm(BytesRef competitiveTerm)voidFieldComparator.TermValComparator. setTopValue(BytesRef value)static AutomatonPrefixQuery. toAutomaton(BytesRef prefix)Build an automaton accepting all terms with the specified prefix.static AutomatonTermRangeQuery. 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 voidSortField. 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 infield, and at a maximum edit distance ofslop.PhraseQuery(String field, BytesRef... terms)Create a phrase query which will match documents that contain the given list of terms at consecutive positions infield.TermInSetQuery(String field, BytesRef... terms)Deprecated.UseTermInSetQuery(String, Collection)instead.TermInSetQuery(MultiTermQuery.RewriteMethod rewriteMethod, String field, BytesRef... terms)Deprecated.UseTermInSetQuery(RewriteMethod, String, Collection)instead.TermRangeQuery(String field, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper)Constructs a query selecting all terms greater/equal thanlowerTermbut less/equal thanupperTerm.TermRangeQuery(String field, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper, MultiTermQuery.RewriteMethod rewriteMethod)Constructs a query selecting all terms greater/equal thanlowerTermbut less/equal thanupperTerm.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 newTermInSetQueryfrom 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 BytesRefTermOrdValComparator. value(int slot)Methods in org.apache.lucene.search.comparators with parameters of type BytesRef Modifier and Type Method Description intTermOrdValComparator. compareValues(BytesRef val1, BytesRef val2)voidTermOrdValComparator. 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 BytesRefUnicodeUtil. BIG_TERMA binary term consisting of a number of 0xff bytes, likely to be bigger than other terms (e.g.protected BytesRefStringSorter. pivotprotected BytesRefStringSorter. scratchBytes1protected BytesRefStringSorter. scratchBytes2BytesRefQueryBuilder.TermAndBoost. termthe termFields in org.apache.lucene.util with type parameters of type BytesRef Modifier and Type Field Description static Comparator<BytesRef>OfflineSorter. DEFAULT_COMPARATORDefault comparator: sorts in binary (codepoint) orderMethods in org.apache.lucene.util that return BytesRef Modifier and Type Method Description BytesRefBytesRef. 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 BytesRefBytesRef. deepCopyOf(BytesRef other)Creates a new BytesRef that points to a copy of the bytes fromotherBytesRefBytesRefArray. get(BytesRefBuilder spare, int index)Returns the n'th element of thisBytesRefArrayBytesRefBytesRefBuilder. get()Return aBytesRefthat points to the internal content of this builder.BytesRefBytesRefHash. get(int bytesID, BytesRef ref)Populates and returns aBytesRefwith the bytes for the given bytesID.BytesRefTermAndVector. getTerm()static BytesRefStringHelper. intsRefToBytesRef(IntsRef ints)BytesRefBytesRefIterator. next()Increments the iteration to the nextBytesRefin the iterator.BytesRefOfflineSorter.ByteSequencesReader. next()Reads the next entry into the providedBytesRef.BytesRefBytesRefBuilder. toBytesRef()Build a newBytesRefthat 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 entriesMethods in org.apache.lucene.util with parameters of type BytesRef Modifier and Type Method Description intBytesRefHash. add(BytesRef bytes)Adds a newBytesRefintBytesRefBlockPool. addBytesRef(BytesRef bytes)Add a term returning the start position on the underlyingByteBlockPool.voidByteBlockPool. append(BytesRef bytes)Appends the bytes in the providedBytesRefat the current position.intBytesRefArray. append(BytesRef bytes)Appends a copy of the givenBytesRefto thisBytesRefArray.voidBytesRefBuilder. append(BytesRef ref)Append the provided bytes to this builder.protected abstract intBytesRefComparator. byteAt(BytesRef ref, int i)Return the unsigned byte to use for comparison at indexi, or-1if all bytes that are useful for comparisons are exhausted.static intStringHelper. bytesDifference(BytesRef priorTerm, BytesRef currentTerm)Compares twoBytesRef, element by element, and returns the number of elements common to both arrays (from the start of each).booleanBytesRef. bytesEquals(BytesRef other)Expert: compares the bytes against another BytesRef, returning true if the bytes are equal.static StringToStringUtils. bytesRefToString(BytesRef b)Builds a String with both textual representation of theBytesRefdata and the bytes hex values.static intUnicodeUtil. codePointCount(BytesRef utf8)Returns the number of code points in this UTF8 sequence.intBytesRefComparator. compare(BytesRef o1, BytesRef o2)intBytesRefComparator. compare(BytesRef o1, BytesRef o2, int k)Compare two bytes refs that first k bytes are already guaranteed to be equal.intBytesRef. compareTo(BytesRef other)Unsigned byte order comparisonvoidPagedBytes. copy(BytesRef bytes, BytesRef out)Copy BytesRef in, setting BytesRef out to the result.voidBytesRefBuilder. copyBytes(BytesRef ref)Replace the content of this builder with the provided bytes.longPagedBytes. copyUsingLengthPrefix(BytesRef bytes)Copy bytes in, writing the length as a 1 or 2 byte vInt prefix.voidCharsRefBuilder. copyUTF8Bytes(BytesRef bytes)Copy the provided bytes, interpreted as UTF-8 bytes.voidIntsRefBuilder. copyUTF8Bytes(BytesRef bytes)Copy the given UTF-8 bytes into this builder.static BytesRefBytesRef. deepCopyOf(BytesRef other)Creates a new BytesRef that points to a copy of the bytes fromotherstatic booleanStringHelper. endsWith(BytesRef ref, BytesRef suffix)Returnstrueiff the ref ends with the given suffix.voidPagedBytes.Reader. fill(BytesRef b, long start)Reads length as 1 or 2 byte vInt prefix, starting at start.voidBytesRefBlockPool. fillBytesRef(BytesRef term, int start)Populates the given BytesRef with the term starting at start.voidPagedBytes.Reader. fillSlice(BytesRef b, long start, int length)Gets a slice out ofPagedBytesstarting at start with a given length.intBytesRefHash. find(BytesRef bytes)Returns the id of the givenBytesRef.BytesRefBytesRefHash. get(int bytesID, BytesRef ref)Populates and returns aBytesRefwith the bytes for the given bytesID.protected abstract voidStringSorter. get(BytesRefBuilder builder, BytesRef result, int i)static intStringHelper. murmurhash3_x86_32(BytesRef bytes, int seed)static intStringHelper. sortKeyLength(BytesRef priorTerm, BytesRef currentTerm)Returns the length ofcurrentTermneeded for use as a sort key.static booleanStringHelper. startsWith(byte[] ref, BytesRef prefix)Returnstrueiff the ref starts with the given prefix.static booleanStringHelper. startsWith(BytesRef ref, BytesRef prefix)Returnstrueiff the ref starts with the given prefix.static intUnicodeUtil. UTF8toUTF16(BytesRef bytesRef, char[] chars)Utility method forUnicodeUtil.UTF8toUTF16(byte[], int, int, char[])static intUnicodeUtil. UTF8toUTF32(BytesRef utf8, int[] ints)This method assumes valid UTF8 input.voidOfflineSorter.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 SorterStringSorter. fallbackSorter(Comparator<BytesRef> cmp)BytesRefIteratorBytesRefArray. iterator(Comparator<BytesRef> comp)Returns aBytesRefIteratorwith point in time semantics.BytesRefArray.SortStateBytesRefArray. sort(Comparator<BytesRef> comp, boolean stable)Returns aBytesRefArray.SortStaterepresenting 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 TermAndBoostTermAndVector(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 BytesRefCompiledAutomaton. commonSuffixRefShared common suffix accepted by the automaton.BytesRefCompiledAutomaton. termForCompiledAutomaton.AUTOMATON_TYPE.SINGLEthis is the singleton term.Methods in org.apache.lucene.util.automaton that return BytesRef Modifier and Type Method Description BytesRefCompiledAutomaton. floor(BytesRef input, BytesRefBuilder output)Finds largest term accepted by this Automaton, that's <= the provided input term.static BytesRefOperations. getCommonPrefixBytesRef(Automaton a)Returns the longest BytesRef that is a prefix of all accepted strings and visits each state at most once.static BytesRefOperations. 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 BytesRefCompiledAutomaton. floor(BytesRef input, BytesRefBuilder output)Finds largest term accepted by this Automaton, that's <= the provided input term.static AutomatonAutomata. makeBinary(BytesRef term)Returns a new (deterministic) automaton that accepts the single given binary term.static AutomatonAutomata. 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 AutomatonDaciukMihovAutomatonBuilder. build(Iterable<BytesRef> input)Deprecated.Please seeAutomata.makeStringUnion(Iterable)insteadstatic AutomatonAutomata. makeBinaryStringUnion(Iterable<BytesRef> utf8Strings)Returns a new (deterministic and minimal) automaton that accepts the union of the given collection ofBytesRefs representing UTF-8 encoded strings.static AutomatonAutomata. makeStringUnion(Iterable<BytesRef> utf8Strings)Returns a new (deterministic and minimal) automaton that accepts the union of the given collection ofBytesRefs 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 BytesRefPointValue. packedValue()Returns the packed values for the dimensionsBytesRefPointValue. packedValueDocIDBytes()Returns the byte representation of the packed value together with the docIDMethods in org.apache.lucene.util.bkd with parameters of type BytesRef Modifier and Type Method Description static voidMutablePointTreeReaderUtils. partition(BKDConfig config, int maxDoc, int splitDim, int commonPrefixLen, MutablePointTree reader, int from, int to, int mid, BytesRef scratch1, BytesRef scratch2)Partition points aroundmid.static voidMutablePointTreeReaderUtils. 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 BytesRefBytesRefFSTEnum.InputOutput. inputMethods in org.apache.lucene.util.fst that return BytesRef Modifier and Type Method Description BytesRefByteSequenceOutputs. add(BytesRef prefix, BytesRef output)BytesRefByteSequenceOutputs. common(BytesRef output1, BytesRef output2)BytesRefByteSequenceOutputs. getNoOutput()BytesRefByteSequenceOutputs. read(DataInput in)BytesRefByteSequenceOutputs. subtract(BytesRef output, BytesRef inc)static BytesRefUtil. 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 BytesRefByteSequenceOutputs. add(BytesRef prefix, BytesRef output)BytesRefByteSequenceOutputs. common(BytesRef output1, BytesRef output2)static <T> TUtil. get(FST<T> fst, BytesRef input)Looks up the output for this input, or null if the input is not acceptedStringByteSequenceOutputs. outputToString(BytesRef output)longByteSequenceOutputs. 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.BytesRefByteSequenceOutputs. subtract(BytesRef output, BytesRef inc)static IntsRefUtil. toIntsRef(BytesRef input, IntsRefBuilder scratch)Just takes unsigned byte values from the BytesRef and converts into an IntsRef.voidByteSequenceOutputs. write(BytesRef prefix, DataOutput out)
-