Solr & Suggestions - When does the search engine generate (build) suggestions

StackOverflow https://stackoverflow.com/questions/18701698

  •  28-06-2022
  •  | 
  •  

Вопрос

When does Solr (v4) generate or build its suggestions (when indexing or when searching)?

Because, I dont understand the two options buildOnCommit & buildOnOptimize in Solr? Which of the two is the best (in speed and efficiency) to use?

And, in the configuration file solrconfig.xml, is there a parameter to adjust tolerance in order to have multiple suggestions even if the number of different letters between the query & the suggestion is equal to four ?

Это было полезно?

Решение

buildOnOptimize is practically useless, you can optimize your index only manually from the admin panel, for example. buildOnCommit will rebuild your suggestions index too often (depending on the hardCommit settings in solrconfig.xml). It is better to rebuild suggestions manually using cron jobs by adding spellcheck.build=true to the spellcheck handler.

Try to increase spellcheck.count and set spellcheck.onlyMorePopular=false to show more suggestions.

If you still receive less results, than spellcheck.count try to increase spellcheck.alternativeTermCount (the bigger the slower).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top