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.

Example:<br />

<br />

<br />

<br />

<br />

<br />

Classic Filter<br />

This filter takes the output of the Classic Tokenizer and strips periods from acronyms and "'s" from possessives.<br />

Factory class: solr.ClassicFilterFactory<br />

Arguments: None<br />

Example:<br />

<br />

<br />

<br />

<br />

In: "I.B.M. cat's can't"<br />

Tokenizer to Filter: "I.B.M", "cat's", "can't"<br />

Out: "IBM", "cat", "can't"<br />

Common Grams Filter<br />

This filter creates word shingles by combining common tokens such as stop words with regular tokens. This is<br />

useful for creating phrase queries containing common words, such as "the cat." <strong>Solr</strong> normally ignores stop words<br />

in queried phrases, so searching for "the cat" would return all matches for the word "cat."<br />

Factory class: solr.CommonGramsFilterFactory<br />

Arguments:<br />

words: (a common word file in .txt format) Provide the name of a common word file, such as stopwords.txt.<br />

format: (optional) If the stopwords list has been formatted for Snowball, you can specify format="snowball"<br />

so <strong>Solr</strong> can read the stopwords file.<br />

ignoreCase: (boolean) If true, the filter ignores the case of words when comparing them to the common word<br />

file. The default is false.<br />

Example:<br />

<br />

<br />

<br />

<br />

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

119

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

Saved successfully!

Ooh no, something went wrong!