Uses of Class
org.apache.lucene.util.BytesRef
-
Packages that use BytesRef Package Description org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.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 StoredFieldsFormat that allows cross-document and cross-field compression of stored fields.org.apache.lucene.codecs.lucene40 Lucene 4.0 file format.org.apache.lucene.codecs.lucene41 Lucene 4.1 file format.org.apache.lucene.codecs.lucene45 Lucene 4.5 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.payloads The payloads package provides Query mechanisms for finding and using payloads.org.apache.lucene.search.similarities This package contains the various ranking models that can be used in Lucene.org.apache.lucene.util Some utility classes.org.apache.lucene.util.automaton Finite-state automaton for regular expressions.org.apache.lucene.util.fst Finite state transducersorg.apache.lucene.util.mutable Comparable object wrappers -
-
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 & implement this if you need to change the token (such as escaping certain bytes) before it's turned into a graph.BytesRefNumericTokenStream.NumericTermAttributeImpl. getBytesRef()BytesRefToken. getPayload()Returns this Token's payload.Methods in org.apache.lucene.analysis with parameters of type BytesRef Modifier and Type Method Description protected BytesRefTokenStreamToAutomaton. changeToken(BytesRef in)Subclass & implement this if you need to change the token (such as escaping certain bytes) before it's turned into a graph.voidToken. setPayload(BytesRef payload)Sets this Token's payload. -
Uses of BytesRef in org.apache.lucene.analysis.tokenattributes
Methods in org.apache.lucene.analysis.tokenattributes that return BytesRef Modifier and Type Method Description 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 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 that return BytesRef Modifier and Type Method Description BytesRefMappingMultiDocsAndPositionsEnum. getPayload()Methods in org.apache.lucene.codecs that return types with arguments of type BytesRef Modifier and Type Method Description Comparator<BytesRef>BlockTreeTermsReader.FieldReader. getComparator()abstract Comparator<BytesRef>TermsConsumer. getComparator()Return the BytesRef Comparator used to sort terms before feeding to this API.abstract Comparator<BytesRef>TermVectorsWriter. getComparator()Return the BytesRef Comparator used to sort terms before feeding to this API.Methods in org.apache.lucene.codecs with parameters of type BytesRef Modifier and Type Method Description abstract voidPostingsConsumer. addPosition(int position, BytesRef payload, int startOffset, int endOffset)Add a new position & payload, and start/end offset.abstract voidTermVectorsWriter. addPosition(int position, int startOffset, int endOffset, BytesRef payload)Adds a term position and offsetsabstract voidTermsConsumer. finishTerm(BytesRef text, TermStats stats)Finishes the current term; numDocs must be > 0.TermsEnumBlockTreeTermsReader.FieldReader. intersect(CompiledAutomaton compiled, BytesRef startTerm)abstract PostingsConsumerTermsConsumer. startTerm(BytesRef text)Starts a new term in this field; this may be called with no corresponding call to finish if the term had no docs.abstract voidTermVectorsWriter. startTerm(BytesRef term, int freq)Adds a term and its term frequencyfreq.Method parameters in org.apache.lucene.codecs with type arguments of type BytesRef Modifier and Type Method Description abstract voidDocValuesConsumer. addBinaryField(FieldInfo field, Iterable<BytesRef> values)Writes binary docvalues for a field.abstract voidDocValuesConsumer. addSortedField(FieldInfo field, Iterable<BytesRef> values, Iterable<Number> docToOrd)Writes pre-sorted binary docvalues for a field.abstract voidDocValuesConsumer. addSortedSetField(FieldInfo field, Iterable<BytesRef> values, Iterable<Number> docToOrdCount, Iterable<Number> ords)Writes pre-sorted set docvalues for a field -
Uses of BytesRef in org.apache.lucene.codecs.compressing
Methods in org.apache.lucene.codecs.compressing that return types with arguments of type BytesRef Modifier and Type Method Description Comparator<BytesRef>CompressingTermVectorsWriter. getComparator()Methods in org.apache.lucene.codecs.compressing with parameters of type BytesRef Modifier and Type Method Description voidCompressingTermVectorsWriter. addPosition(int position, int startOffset, int endOffset, BytesRef payload)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.voidCompressingTermVectorsWriter. startTerm(BytesRef term, int freq) -
Uses of BytesRef in org.apache.lucene.codecs.lucene40
Methods in org.apache.lucene.codecs.lucene40 that return types with arguments of type BytesRef Modifier and Type Method Description Comparator<BytesRef>Lucene40TermVectorsWriter. getComparator()Methods in org.apache.lucene.codecs.lucene40 with parameters of type BytesRef Modifier and Type Method Description voidLucene40TermVectorsWriter. addPosition(int position, int startOffset, int endOffset, BytesRef payload)voidLucene40TermVectorsWriter. startTerm(BytesRef term, int freq) -
Uses of BytesRef in org.apache.lucene.codecs.lucene41
Methods in org.apache.lucene.codecs.lucene41 with parameters of type BytesRef Modifier and Type Method Description voidLucene41PostingsWriter. addPosition(int position, BytesRef payload, int startOffset, int endOffset)Add a new position & payload -
Uses of BytesRef in org.apache.lucene.codecs.lucene45
Method parameters in org.apache.lucene.codecs.lucene45 with type arguments of type BytesRef Modifier and Type Method Description voidLucene45DocValuesConsumer. addBinaryField(FieldInfo field, Iterable<BytesRef> values)voidLucene45DocValuesConsumer. addSortedField(FieldInfo field, Iterable<BytesRef> values, Iterable<Number> docToOrd)voidLucene45DocValuesConsumer. addSortedSetField(FieldInfo field, Iterable<BytesRef> values, Iterable<Number> docToOrdCount, Iterable<Number> ords)protected voidLucene45DocValuesConsumer. addTermsDict(FieldInfo field, Iterable<BytesRef> values)expert: writes a value dictionary for a sorted/sortedset field -
Uses of BytesRef in org.apache.lucene.document
Methods in org.apache.lucene.document that return BytesRef Modifier and Type Method Description BytesRefField. 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.BytesRef[]Document. getBinaryValues(String name)Returns an array of byte arrays for of the fields that have the name specified as the method parameter.Methods in org.apache.lucene.document with parameters of type BytesRef Modifier and Type Method Description static byte[]CompressionTools. decompress(BytesRef bytes)Decompress the byte array previously returned by compress (referenced by the provided BytesRef)static StringCompressionTools. decompressString(BytesRef bytes)Decompress the byte array (referenced by the provided BytesRef) previously returned by compressString back into a StringvoidField. setBytesValue(BytesRef value)Expert: change the value of this field.Constructors in org.apache.lucene.document with parameters of type BytesRef Constructor Description BinaryDocValuesField(String name, BytesRef value)Create a new binary DocValues field.DerefBytesDocValuesField(String name, BytesRef bytes)Deprecated.Create a new fixed or variable-length DocValues field.DerefBytesDocValuesField(String name, BytesRef bytes, boolean isFixedLength)Deprecated.Create a new fixed or variable length DocValues field.Field(String name, BytesRef bytes, FieldType type)Create field with binary value.SortedBytesDocValuesField(String name, BytesRef bytes)Deprecated.Create a new fixed or variable-length sorted DocValues field.SortedBytesDocValuesField(String name, BytesRef bytes, boolean isFixedLength)Deprecated.Create a new fixed or variable length sorted DocValues field.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.StraightBytesDocValuesField(String name, BytesRef bytes)Deprecated.Create a new fixed or variable length DocValues field.StraightBytesDocValuesField(String name, BytesRef bytes, boolean isFixedLength)Deprecated.Create a new fixed or variable length direct DocValues field. -
Uses of BytesRef in org.apache.lucene.index
Fields in org.apache.lucene.index declared as BytesRef Modifier and Type Field Description protected BytesRef[]DocTermOrds. indexedTermsArrayHolds the indexed (by default every 128th) terms.protected BytesRefDocTermOrds. prefixIf non-null, only terms matching this prefix were indexed.Methods in org.apache.lucene.index that return BytesRef Modifier and Type Method Description BytesRefIndexableField. binaryValue()Non-null if this field has a binary valueBytesRefTerm. bytes()Returns the bytes of this term.abstract BytesRefDocsAndPositionsEnum. getPayload()Returns the payload at this position, or null if no payload was indexed.BytesRefFilterAtomicReader.FilterDocsAndPositionsEnum. getPayload()BytesRefMultiDocsAndPositionsEnum. getPayload()BytesRefDocTermOrds. lookupTerm(TermsEnum termsEnum, int ord)Returns the term (BytesRef) corresponding to the provided ordinal.BytesRefFilterAtomicReader.FilterTermsEnum. next()BytesRefFilteredTermsEnum. next()BytesRefMultiTermsEnum. next()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.BytesRefFilterAtomicReader.FilterTermsEnum. term()BytesRefFilteredTermsEnum. term()BytesRefMultiTermsEnum. term()abstract BytesRefTermsEnum. term()Returns current term.Methods in org.apache.lucene.index that return types with arguments of type BytesRef Modifier and Type Method Description Comparator<BytesRef>FilterAtomicReader.FilterTerms. getComparator()Comparator<BytesRef>FilterAtomicReader.FilterTermsEnum. getComparator()Comparator<BytesRef>FilteredTermsEnum. getComparator()Comparator<BytesRef>MultiTerms. getComparator()Comparator<BytesRef>MultiTermsEnum. getComparator()abstract Comparator<BytesRef>Terms. getComparator()Return the BytesRef Comparator used to sort terms provided by the iterator.Methods in org.apache.lucene.index with parameters of type BytesRef Modifier and Type Method Description 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)abstract voidBinaryDocValues. get(int docID, BytesRef result)Lookup the value for document.voidSortedDocValues. get(int docID, BytesRef result)static DocsEnumMultiFields. getTermDocsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term)ReturnsDocsEnumfor the specified field & term.static DocsEnumMultiFields. getTermDocsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term, int flags)ReturnsDocsEnumfor the specified field & term, with control over whether freqs are required.static DocsAndPositionsEnumMultiFields. getTermPositionsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term)ReturnsDocsAndPositionsEnumfor the specified field & term.static DocsAndPositionsEnumMultiFields. getTermPositionsEnum(IndexReader r, Bits liveDocs, String field, BytesRef term, int flags)ReturnsDocsAndPositionsEnumfor the specified field & term, with control over whether offsets and payloads are required.TermsEnumMultiTerms. intersect(CompiledAutomaton compiled, BytesRef startTerm)TermsEnumTerms. intersect(CompiledAutomaton compiled, BytesRef startTerm)Returns a TermsEnum that iterates over all terms that are accepted by the providedCompiledAutomaton.voidMultiDocValues.MultiSortedDocValues. lookupOrd(int ord, BytesRef result)voidMultiDocValues.MultiSortedSetDocValues. lookupOrd(long ord, BytesRef result)voidSingletonSortedSetDocValues. lookupOrd(long ord, BytesRef result)abstract voidSortedDocValues. lookupOrd(int ord, BytesRef result)Retrieves the value for the specified ordinal.abstract voidSortedSetDocValues. lookupOrd(long ord, BytesRef result)Retrieves the value for the specified ordinal.longSingletonSortedSetDocValues. 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 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.SeekStatusFilterAtomicReader.FilterTermsEnum. seekCeil(BytesRef text)TermsEnum.SeekStatusFilteredTermsEnum. seekCeil(BytesRef term)This enum does not support seeking!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.booleanFilteredTermsEnum. seekExact(BytesRef term)This enum does not support seeking!voidFilteredTermsEnum. seekExact(BytesRef term, TermState state)This enum does not support seeking!booleanMultiTermsEnum. seekExact(BytesRef term)booleanTermsEnum. seekExact(BytesRef text)Attempts to seek to the exact term, returning true if the term is found.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.protected voidDocTermOrds. uninvert(AtomicReader reader, Bits liveDocs, BytesRef termPrefix)Call this only once (if you subclass!)Constructors in org.apache.lucene.index with parameters of type BytesRef Constructor Description DocTermOrds(AtomicReader reader, Bits liveDocs, String field, BytesRef termPrefix)Inverts only terms starting w/ prefixDocTermOrds(AtomicReader reader, Bits liveDocs, String field, BytesRef termPrefix, int maxTermDocFreq)Inverts only terms starting w/ prefix, and only terms whose docFreq (not taking deletions into account) is <= maxTermDocFreqDocTermOrds(AtomicReader reader, Bits liveDocs, String field, BytesRef termPrefix, int maxTermDocFreq, int indexIntervalBits)Inverts only terms starting w/ prefix, and only terms whose docFreq (not taking deletions into account) is <= maxTermDocFreq, with a custom indexing interval (default is every 128nd term).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()BytesRefTermRangeFilter. getLowerTerm()Returns the lower value of this range filterBytesRefTermRangeQuery. getLowerTerm()Returns the lower value of this range queryBytesRefDocTermOrdsRangeFilter. getLowerVal()Returns the lower value of this range filterBytesRefTermRangeFilter. getUpperTerm()Returns the upper value of this range filterBytesRefTermRangeQuery. getUpperTerm()Returns the upper value of this range queryBytesRefDocTermOrdsRangeFilter. getUpperVal()Returns the upper value of this range filterBytesRefFuzzyTermsEnum. next()BytesRefFuzzyTermsEnum. term()BytesRefTermStatistics. term()returns the term textBytesRefFieldComparator.TermOrdValComparator. value(int slot)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()Comparator<BytesRef>FuzzyTermsEnum. getComparator()static FieldCacheRangeFilter<BytesRef>FieldCacheRangeFilter. newBytesRefRange(String field, BytesRef lowerVal, BytesRef upperVal, boolean includeLower, boolean includeUpper)Creates a BytesRef range filter usingFieldCache.getTermsIndex(org.apache.lucene.index.AtomicReader, java.lang.String).FieldComparator<BytesRef>FieldComparator.TermOrdValComparator. setNextReader(AtomicReaderContext context)FieldComparator<BytesRef>FieldComparator.TermValComparator. setNextReader(AtomicReaderContext context)Methods in org.apache.lucene.search with parameters of type BytesRef Modifier and Type Method Description protected FilteredTermsEnum.AcceptStatusPrefixTermsEnum. accept(BytesRef term)protected FilteredTermsEnum.AcceptStatusTermRangeTermsEnum. accept(BytesRef term)intFieldComparator.TermOrdValComparator. compareValues(BytesRef val1, BytesRef val2)intFieldComparator.TermValComparator. compareValues(BytesRef val1, BytesRef val2)protected TermsEnumFuzzyTermsEnum. getAutomatonEnum(int editDistance, BytesRef lastTerm)return an automata-based enum for matching up to editDistance from lastTerm, if possiblestatic TermRangeFilterTermRangeFilter. Less(String fieldName, BytesRef upperTerm)Constructs a filter for fieldfieldNamematching less than or equal toupperTerm.protected voidFuzzyTermsEnum. maxEditDistanceChanged(BytesRef lastTerm, int maxEdits, boolean init)static TermRangeFilterTermRangeFilter. More(String fieldName, BytesRef lowerTerm)Constructs a filter for fieldfieldNamematching greater than or equal tolowerTerm.static DocTermOrdsRangeFilterDocTermOrdsRangeFilter. newBytesRefRange(String field, BytesRef lowerVal, BytesRef upperVal, boolean includeLower, boolean includeUpper)Creates a BytesRef range filter usingFieldCache.getTermsIndex(org.apache.lucene.index.AtomicReader, java.lang.String).static FieldCacheRangeFilter<BytesRef>FieldCacheRangeFilter. newBytesRefRange(String field, BytesRef lowerVal, BytesRef upperVal, boolean includeLower, boolean includeUpper)Creates a BytesRef range filter usingFieldCache.getTermsIndex(org.apache.lucene.index.AtomicReader, java.lang.String).byteFieldCache.ByteParser. parseByte(BytesRef term)Deprecated.Return a single Byte representation of this field's value.doubleFieldCache.DoubleParser. parseDouble(BytesRef term)Return an double representation of this field's value.floatFieldCache.FloatParser. parseFloat(BytesRef term)Return an float representation of this field's value.intFieldCache.IntParser. parseInt(BytesRef term)Return an integer representation of this field's value.longFieldCache.LongParser. parseLong(BytesRef term)Return an long representation of this field's value.shortFieldCache.ShortParser. parseShort(BytesRef term)Deprecated.Return a short representation of this field's value.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.TermOrdValComparator. setTopValue(BytesRef value)voidFieldComparator.TermValComparator. setTopValue(BytesRef value)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 FieldCacheTermsFilter(String field, BytesRef... terms)PrefixTermsEnum(TermsEnum tenum, BytesRef prefixText)TermRangeFilter(String fieldName, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper)TermRangeQuery(String field, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper)Constructs a query selecting all terms greater/equal thanlowerTermbut less/equal thanupperTerm.TermRangeTermsEnum(TermsEnum tenum, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper)Enumerates all terms greater/equal thanlowerTermbut less/equal thanupperTerm.TermStatistics(BytesRef term, long docFreq, long totalTermFreq) -
Uses of BytesRef in org.apache.lucene.search.payloads
Fields in org.apache.lucene.search.payloads declared as BytesRef Modifier and Type Field Description protected BytesRefPayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer. payload -
Uses of BytesRef in org.apache.lucene.search.similarities
Methods in org.apache.lucene.search.similarities with parameters of type BytesRef Modifier and Type Method Description abstract floatSimilarity.SimScorer. computePayloadFactor(int doc, int start, int end, BytesRef payload)Calculate a scoring factor based on the data in the payload.protected floatBM25Similarity. scorePayload(int doc, int start, int end, BytesRef payload)The default implementation returns1floatDefaultSimilarity. scorePayload(int doc, int start, int end, BytesRef payload)The default implementation returns1abstract floatTFIDFSimilarity. scorePayload(int doc, int start, int end, BytesRef payload)Calculate a scoring factor based on the data in the payload. -
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.Methods 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 fromotherBytesRefBytesRefHash. get(int bytesID, BytesRef ref)Populates and returns aBytesRefwith the bytes for the given bytesID.BytesRefBytesRefIterator. next()Increments the iteration to the nextBytesRefin the iterator.Methods in org.apache.lucene.util that return types with arguments of type BytesRef Modifier and Type Method Description Comparator<BytesRef>BytesRefIterator. getComparator()Return theBytesRefComparator used to sort terms provided by the iterator.static Comparator<BytesRef>BytesRef. getUTF8SortedAsUnicodeComparator()static Comparator<BytesRef>BytesRef. getUTF8SortedAsUTF16Comparator()Deprecated.This comparator is only a transition mechanismMethods in org.apache.lucene.util with parameters of type BytesRef Modifier and Type Method Description intBytesRefHash. add(BytesRef bytes)Adds a newBytesRefintBytesRefHash. add(BytesRef bytes, int code)Adds a newBytesRefwith a pre-calculated hash code.voidNumericUtils.IntRangeBuilder. addRange(BytesRef minPrefixCoded, BytesRef maxPrefixCoded)Overwrite this method, if you like to receive the already prefix encoded range bounds.voidNumericUtils.LongRangeBuilder. addRange(BytesRef minPrefixCoded, BytesRef maxPrefixCoded)Overwrite this method, if you like to receive the already prefix encoded range bounds.voidByteBlockPool. append(BytesRef bytes)Appends the bytes in the providedBytesRefat the current position.voidBytesRef. append(BytesRef other)Appends the bytes from the givenBytesRefstatic intStringHelper. bytesDifference(BytesRef left, BytesRef right)Compares twoBytesRef, element by element, and returns the number of elements common to both arrays.booleanBytesRef. bytesEquals(BytesRef other)Expert: compares the bytes against another BytesRef, returning true if the bytes are equal.static intUnicodeUtil. codePointCount(BytesRef utf8)Returns the number of code points in this UTF8 sequence.intBytesRef. compareTo(BytesRef other)Unsigned byte order comparisonvoidPagedBytes. copy(BytesRef bytes, BytesRef out)Copy BytesRef in, setting BytesRef out to the result.voidBytesRef. copyBytes(BytesRef other)Copies the bytes from the givenBytesReflongPagedBytes. copyUsingLengthPrefix(BytesRef bytes)Copy bytes in, writing the length as a 1 or 2 byte vInt prefix.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.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.intBytesRefHash. find(BytesRef bytes, int code)Returns the id of the givenBytesRefwith a pre-calculated hash code.BytesRefBytesRefHash. get(int bytesID, BytesRef ref)Populates and returns aBytesRefwith the bytes for the given bytesID.static intNumericUtils. getPrefixCodedIntShift(BytesRef val)Returns the shift value from a prefix encodedint.static intNumericUtils. getPrefixCodedLongShift(BytesRef val)Returns the shift value from a prefix encodedlong.static intNumericUtils. intToPrefixCoded(int val, int shift, BytesRef bytes)Returns prefix coded bits after reducing the precision byshiftbits.static voidNumericUtils. intToPrefixCodedBytes(int val, int shift, BytesRef bytes)Returns prefix coded bits after reducing the precision byshiftbits.static intNumericUtils. longToPrefixCoded(long val, int shift, BytesRef bytes)Returns prefix coded bits after reducing the precision byshiftbits.static voidNumericUtils. longToPrefixCodedBytes(long val, int shift, BytesRef bytes)Returns prefix coded bits after reducing the precision byshiftbits.static intNumericUtils. prefixCodedToInt(BytesRef val)Returns an int from prefixCoded bytes.static longNumericUtils. prefixCodedToLong(BytesRef val)Returns a long from prefixCoded bytes.voidByteBlockPool. setBytesRef(BytesRef term, int textStart)static booleanStringHelper. startsWith(BytesRef ref, BytesRef prefix)Returnstrueiff the ref starts with the given prefix.static voidUnicodeUtil. UTF16toUTF8(char[] source, int offset, int length, BytesRef result)Encode characters from a char[] source, starting at offset for length chars.static voidUnicodeUtil. UTF16toUTF8(CharSequence s, int offset, int length, BytesRef result)Encode characters from this String, starting at offset for length characters.static intUnicodeUtil. UTF16toUTF8WithHash(char[] source, int offset, int length, BytesRef result)Encode characters from a char[] source, starting at offset for length chars.static voidUnicodeUtil. UTF8toUTF16(BytesRef bytesRef, CharsRef chars)Utility method forUnicodeUtil.UTF8toUTF16(byte[], int, int, CharsRef)static voidUnicodeUtil. UTF8toUTF32(BytesRef utf8, IntsRef utf32)This method assumes valid UTF8 input.Method parameters in org.apache.lucene.util with type arguments of type BytesRef Modifier and Type Method Description int[]BytesRefHash. sort(Comparator<BytesRef> comp)Returns the values array sorted by the referenced byte values. -
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.PREFIX, this is the prefix term; forCompiledAutomaton.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, BytesRef output)Finds largest term accepted by this Automaton, that's <= the provided input term.static BytesRefSpecialOperations. getCommonPrefixBytesRef(Automaton a)static BytesRefSpecialOperations. getCommonSuffixBytesRef(Automaton a)Methods in org.apache.lucene.util.automaton with parameters of type BytesRef Modifier and Type Method Description BytesRefCompiledAutomaton. floor(BytesRef input, BytesRef output)Finds largest term accepted by this Automaton, that's <= the provided input term.Method parameters in org.apache.lucene.util.automaton with type arguments of type BytesRef Modifier and Type Method Description static AutomatonBasicAutomata. makeStringUnion(Collection<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.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, BytesRef 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)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 BytesRefUtil. toBytesRef(IntsRef input, BytesRef scratch)Just converts IntsRef to BytesRef; you must ensure the int values fit into a byte.static IntsRefUtil. toIntsRef(BytesRef input, IntsRef scratch)Just takes unsigned byte values from the BytesRef and converts into an IntsRef.voidByteSequenceOutputs. write(BytesRef prefix, DataOutput out) -
Uses of BytesRef in org.apache.lucene.util.mutable
Fields in org.apache.lucene.util.mutable declared as BytesRef Modifier and Type Field Description BytesRefMutableValueStr. value
-