Example usage for org.apache.solr.common.params SpellingParams SPELLCHECK_ONLY_MORE_POPULAR

List of usage examples for org.apache.solr.common.params SpellingParams SPELLCHECK_ONLY_MORE_POPULAR

Introduction

In this page you can find the example usage for org.apache.solr.common.params SpellingParams SPELLCHECK_ONLY_MORE_POPULAR.

Prototype

String SPELLCHECK_ONLY_MORE_POPULAR

To view the source code for org.apache.solr.common.params SpellingParams SPELLCHECK_ONLY_MORE_POPULAR.

Click Source Link

Document

When this parameter is set to true and the misspelled word exists in the user field, only words that occur more frequently in the Solr field than the one given will be returned.

Usage

From source file:org.springframework.data.solr.core.query.SpellcheckOptions.java

License:Apache License

/**
 * Limits spellcheck responses to queries that are more popular than the original query.
 *
 * @return/*from ww  w.j a  v  a 2s.co m*/
 */
public SpellcheckOptions onlyMorePopular() {
    return createNewAndAppend(SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR, true);
}

From source file:org.springframework.data.solr.core.query.SpellcheckOptions.java

License:Apache License

/**
 * @return never {@literal null}./*from  ww w .  ja  va  2s .  co m*/
 */
public boolean getOnlyMorePopular() {
    return params.containsKey(SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR)
            ? (Boolean) params.get(SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR)
            : false;
}