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.

hl.score.b 0.75 Specifies BM25 length normalization parameter 'b'. For<br />

example, it can be set to "0" to ignore the length of passages<br />

entirely when ranking.<br />

hl.score.pivot 87 Specifies BM25 average passage length in characters.<br />

hl.bs.language blank Specifies the breakiterator language for dividing the document<br />

into passages.<br />

hl.bs.country blank Specifies the breakiterator country for dividing the document<br />

into passages.<br />

hl.bs.variant blank Specifies the breakiterator variant for dividing the document into<br />

passages.<br />

hl.bs.type SENTENCE Specifies the breakiterator type for dividing the document into<br />

passages. Can be SENTENCE, WORD, CHARACTER, LINE,<br />

or WHOLE.<br />

Related Content<br />

PostingsHighlighter from the <strong>Solr</strong> wiki<br />

Postings<strong>Solr</strong>Highlighter javadoc<br />

Spell Checking<br />

The SpellCheck component is designed to provide inline query suggestions based on other, similar, terms. The<br />

basis for these suggestions can be terms in a field in <strong>Solr</strong>, externally created text files, or fields in other Lucene<br />

indexes.<br />

Topics covered in this section:<br />

Configuring the SpellCheckComponent<br />

Spell Check Parameters<br />

Distributed SpellCheck<br />

Configuring the SpellCheckComponent<br />

Define Spell Check in solrconfig.xml<br />

The first step is to specify the source of terms in solrconfig.xml. There are three approaches to spell<br />

checking in <strong>Solr</strong>, discussed below.<br />

IndexBasedSpellChecker<br />

The IndexBasedSpellChecker uses a <strong>Solr</strong> index as the basis for a parallel index used for spell checking. It<br />

requires defining a field as the basis for the index terms; a common practice is to copy terms from some fields<br />

(such as title, body, etc.) to another field created for spell checking. Here is a simple example of configuring s<br />

olrconfig.xml with the IndexBasedSpellChecker:<br />

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

323

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

Saved successfully!

Ooh no, something went wrong!