11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

this filter is most often used for special situations.<br />

Factory class: solr.TrimFilterFactory<br />

Arguments:<br />

updateOffsets: if luceneMatchVersion is 4.3 or earlier and updateOffsets="true" , trimmed tokens'<br />

start and end offsets will be updated to those of the first and last characters (plus one) remaining in the token. T<br />

his argument is invalid if luceneMatchVersion is 5.0 or later.<br />

Example:<br />

The PatternTokenizerFactory configuration used here splits the input on simple commas, it does not remove<br />

whitespace.<br />

<br />

<br />

<br />

<br />

In: "one, two , three ,four "<br />

Tokenizer to Filter: "one", " two ", " three ", "four "<br />

Out: "one", "two", "three", "four"<br />

Type As Payload Filter<br />

This filter adds the token's type, as an encoded byte sequence, as its payload.<br />

Factory class: solr.TypeAsPayloadTokenFilterFactory<br />

Arguments: None<br />

Example:<br />

<br />

<br />

<br />

<br />

In: "Pay Bob's I.O.U."<br />

Tokenizer to Filter: "Pay", "Bob's", "I.O.U."<br />

Out: "Pay"[], "Bob's"[], "I.O.U."[]<br />

Type Token Filter<br />

This filter blacklists or whitelists a specified list of token types, assuming the tokens have type metadata<br />

associated with them. For example, the UAX29 URL Email Tokenizer emits "" and "" typed<br />

tokens, as well as other types. This filter would allow you to pull out only e-mail addresses from text as tokens, if<br />

you wish.<br />

Factory class: solr.TypeTokenFilterFactory<br />

Arguments:<br />

types: Defines the location of a file of types to filter.<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

140

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!