11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

0 and maxPosAsterisk to 1.<br />

maxFractionAsterisk (float, default = 0.0) An additional parameter that triggers the reversal if asterisk ('*')<br />

position is less than this fraction of the query token length.<br />

minTrailing (integer, default = 2) The minimum number of trailing characters in a query token after the last<br />

wildcard character. For good performance this should be set to a value larger than 1.<br />

Example:<br />

<br />

<br />

<br />

<br />

In: "*foo *bar"<br />

Tokenizer to Filter: "*foo", "*bar"<br />

Out: "oof*", "rab*"<br />

Shingle Filter<br />

This filter constructs shingles, which are token n-grams, from the token stream. It combines runs of tokens into a<br />

single token.<br />

Factory class: solr.ShingleFilterFactory<br />

Arguments:<br />

minShingleSize: (integer, default 2) The minimum number of tokens per shingle.<br />

maxShingleSize: (integer, must be >= 2, default 2) The maximum number of tokens per shingle.<br />

outputUnigrams: (true/false) If true (the default), then each individual token is also included at its original<br />

position.<br />

outputUnigramsIfNoShingles: (true/false) If false (the default), then individual tokens will be output if no<br />

shingles are possible.<br />

tokenSeparator: (string, default is " ") The default string to use when joining adjacent tokens to form a shingle.<br />

Example:<br />

Default behavior.<br />

<br />

<br />

<br />

<br />

In: "To be, or what?"<br />

Tokenizer to Filter: "To"(1), "be"(2), "or"(3), "what"(4)<br />

Out: "To"(1), "To be"(1), "be"(2), "be or"(2), "or"(3), "or what"(3), "what"(4)<br />

Example:<br />

A shingle size of four, do not include original token.<br />

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

134

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

Saved successfully!

Ooh no, something went wrong!