List of usage examples for org.apache.solr.common.params SpellingParams SPELLCHECK_BUILD
String SPELLCHECK_BUILD
To view the source code for org.apache.solr.common.params SpellingParams SPELLCHECK_BUILD.
Click Source Link
From source file:org.dspace.discovery.SolrServiceImpl.java
License:BSD License
@Override public void buildSpellCheck() throws SearchServiceException { try {//from w w w . j ava2s .com if (getSolr() == null) { return; } SolrQuery solrQuery = new SolrQuery(); solrQuery.set("spellcheck", true); solrQuery.set(SpellingParams.SPELLCHECK_BUILD, true); getSolr().query(solrQuery); } catch (SolrServerException e) { //Make sure to also log the exception since this command is usually run from a crontab. log.error(e, e); throw new SearchServiceException(e); } }
From source file:org.springframework.data.solr.core.query.SpellcheckOptions.java
License:Apache License
/** * If set, Solr creates the dictionary that the SolrSpellChecker will use for spell-checking. * * @return new {@link SpellcheckOptions} *//*from w w w.j a va 2 s . co m*/ public SpellcheckOptions buildDictionary() { return createNewAndAppend(SpellingParams.SPELLCHECK_BUILD, true); }
From source file:org.springframework.data.solr.core.query.SpellcheckOptions.java
License:Apache License
/** * @return can be {@literal null}.//from w ww . j av a 2s.co m */ public boolean buildDirectory() { return params.containsKey(SpellingParams.SPELLCHECK_BUILD) ? (Boolean) params.get(SpellingParams.SPELLCHECK_BUILD) : false; }