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.

N-Gram Filter<br />

Generates n-gram tokens of sizes in the given range. Note that tokens are ordered by position and then by gram<br />

size.<br />

Factory class: solr.NGramFilterFactory<br />

Arguments:<br />

minGramSize: (integer, default 1) The minimum gram size.<br />

maxGramSize: (integer, default 2) The maximum gram size.<br />

Example:<br />

Default behavior.<br />

<br />

<br />

<br />

<br />

In: "four score"<br />

Tokenizer to Filter: "four", "score"<br />

Out: "f", "o", "u", "r", "fo", "ou", "ur", "s", "c", "o", "r", "e", "sc", "co", "or", "re"<br />

Example:<br />

A range of 1 to 4.<br />

<br />

<br />

<br />

<br />

In: "four score"<br />

Tokenizer to Filter: "four", "score"<br />

Out: "f", "fo", "fou", "four", "s", "sc", "sco", "scor"<br />

Example:<br />

A range of 3 to 5.<br />

<br />

<br />

<br />

<br />

In: "four score"<br />

Tokenizer to Filter: "four", "score"<br />

Out: "fou", "four", "our", "sco", "scor", "score", "cor", "core", "ore"<br />

Numeric Payload Token Filter<br />

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

129

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

Saved successfully!

Ooh no, something went wrong!