[ 
https://issues.apache.org/jira/browse/SOLR-17613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945492#comment-17945492
 ] 

Matthew Richardson commented on SOLR-17613:
-------------------------------------------

Attempted again on Solr 9.8.1 using instructions found for latest version:

[https://solr.apache.org/guide/solr/latest/configuration-guide/managed-resources.html]

*When It Works*

bin/solr start -e techproducts

curl -X PUT -H 'Content-type:application/json' --data-binary 
'\{"mad":["angry","upset"]}' 
"http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english";

*When It Fails*

bin/solr start -c

bin/solr create -c techproducts

curl -X PUT -H 'Content-type:application/json' --data-binary 
'\{"mad":["angry","upset"]}' 
"http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english";

"SolrCore 'techproducts' is not available due to init failure: "

Is there some reason why updating synonyms doesn't work in cloud mode? Updating 
request handlers works just fine, though that involves hitting endpoints that 
look like http://localhost:8983/api/collections/techproducts/config

 

> Unable to add stop/prod words using curl example from Solr documentation
> ------------------------------------------------------------------------
>
>                 Key: SOLR-17613
>                 URL: https://issues.apache.org/jira/browse/SOLR-17613
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>            Reporter: Matthew Richardson
>            Priority: Minor
>
> The documentation for adding stop/prot words to a collection appears to be 
> incorrect. On this page:
> [https://solr.apache.org/guide/solr/latest/configuration-guide/managed-resources.html#managing-stop-words]
> It states that I can add a new stopword with this curl command:
> curl -X PUT -H 'Content-type:application/json' --data-binary '["foo"]' " 
> http://localhost:8983/solr/techproducts/schema/analysis/stopwords/english";
> If I modify that to use the default collection "gettingstarted":
> curl -X PUT -H 'Content-type:application/json' --data-binary '["foo"]' " 
> http://localhost:8983/solr/gettingstarted/schema/analysis/stopwords/english";
> I get an error:
> "error":\{ 
> "metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","org.apache.solr.common.SolrException"],
>  "msg":"Expected Map to create a new ManagedResource but received a 
> java.util.ArrayList", "code":400 }
> (I'm using a default install of solr 9.7.0. Starting it up with 
> /opt/apache/solr-9.7.0/bin/solr start -e cloud)
> It looks to me like the input: ["foo"] should instead be something like: 
> \{"key": ["foo"]}
> Does anyone know how to add stop words via curl? If I can figure out how to 
> do this correctly I could submit a pull request to get the documentation 
> updated.
> I posted this to the solr users group in late September and got no reply.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to