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.

Example:<br />

Default behavior. Note that this tokenizer operates over the whole field. It does not break the field at whitespace.<br />

As a result, the space character is included in the encoding.<br />

<br />

<br />

<br />

In: "hey man"<br />

Out: "h", "e", "y", " ", "m", "a", "n", "he", "ey", "y ", " m", "ma", "an"<br />

Example:<br />

With an n-gram size range of 4 to 5:<br />

<br />

<br />

<br />

In: "bicycle"<br />

Out: "bicy", "bicyc", "icyc", "icycl", "cycl", "cycle", "ycle"<br />

Edge N-Gram Tokenizer<br />

Reads the field text and generates edge n-gram tokens of sizes in the given range.<br />

Factory class: solr.EdgeNGramTokenizerFactory<br />

Arguments:<br />

minGramSize: (integer, default is 1) The minimum n-gram size, must be > 0.<br />

maxGramSize: (integer, default is 1) The maximum n-gram size, must be >= minGramSize.<br />

side: ("front" or "back", default is "front") Whether to compute the n-grams from the beginning (front) of the text<br />

or from the end (back).<br />

Example:<br />

Default behavior (min and max default to 1):<br />

<br />

<br />

<br />

In: "babaloo"<br />

Out: "b"<br />

Example:<br />

Edge n-gram range of 2 to 5<br />

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

112

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

Saved successfully!

Ooh no, something went wrong!