Reputation: 79
I would like to add the following searchHandler to my solr core locally:
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">spell_checking_text</str>
<lst name="spellchecker">
<str name="name">spellchecker</str>
<str name="field">spellchecker</str>
<str name="classname">solr.DirectSolrSpellChecker</str>
</lst>
</searchComponent>
Is there any way to do this through cURL?
Upvotes: 0
Views: 49
Reputation: 546
If you want to add a searchComponent through cURL, here is an example:
curl -X POST -H 'Content-type:application/json' -d '{
"add-searchcomponent": {
"name": "spellcheck",
"class": "solr.SpellCheckComponent",
"spellchecker": { "name": "spellchecker" ,"field": "spellchecker", "classname":"solr.DirectSolrSpellChecker" }
}
}' http://localhost:8983/solr/collection_name/config
Depending on the version of Solr you are using, here you can find the relative reference guide. This is for the latest Solr version.
Upvotes: 1