C# (CSharp) Lucene.Net.Analysis.Payloads Пространство имен

Классы

Имя Описание
AbstractEncoder Base class for payload encoders.
DelimitedPayloadTokenFilter Characters before the delimiter are the "token", those after are the payload.

For example, if the delimiter is '|', then for the string "foo|bar", foo is the token and "bar" is a payload.

Note, you can also include a {@link org.apache.lucene.analysis.payloads.PayloadEncoder} to convert the payload in an appropriate way (from characters to bytes).

Note make sure your Tokenizer doesn't split on the delimiter, or this won't work

DelimitedPayloadTokenFilterFactory Factory for DelimitedPayloadTokenFilter.
 <fieldType name="text_dlmtd" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float" delimiter="|"/> </analyzer> </fieldType>
DelimitedPayloadTokenFilterTest
FloatEncoder Encode a character array Float as a BytesRef.

IdentityEncoder Does nothing other than convert the char array to a byte array using the specified encoding.
IntegerEncoder Encode a character array Integer as a BytesRef.

See org.apache.lucene.analysis.payloads.PayloadHelper#encodeInt(int, byte[], int).

NumericPayloadTokenFilter Assigns a payload to a token based on the org.apache.lucene.analysis.Token#type()
NumericPayloadTokenFilterFactory Factory for NumericPayloadTokenFilter.
 <fieldType name="text_numpayload" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.NumericPayloadTokenFilterFactory" payload="24" typeMatch="word"/> </analyzer> </fieldType>
NumericPayloadTokenFilterTest
NumericPayloadTokenFilterTest.WordTokenFilter
PayloadHelper Utility methods for encoding payloads.
TestDelimitedPayloadTokenFilterFactory
TokenOffsetPayloadTokenFilter Adds the OffsetAttribute#startOffset() and OffsetAttribute#endOffset() First 4 bytes are the start
TokenOffsetPayloadTokenFilterFactory Factory for TokenOffsetPayloadTokenFilter.
 <fieldType name="text_tokenoffset" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.TokenOffsetPayloadTokenFilterFactory"/> </analyzer> </fieldType>
TokenOffsetPayloadTokenFilterTest
TypeAsPayloadTokenFilterFactory Factory for TypeAsPayloadTokenFilter.
 <fieldType name="text_typeaspayload" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.TypeAsPayloadTokenFilterFactory"/> </analyzer> </fieldType>
TypeAsPayloadTokenFilterTest
TypeAsPayloadTokenFilterTest.WordTokenFilter