[ https://issues.apache.org/jira/browse/SOLR-17613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945947#comment-17945947 ]
Eric Pugh commented on SOLR-17613: ---------------------------------- I just tried on main with bin/solr start -e techproducts and curl -X PUT -H 'Content-type:application/json' --data-binary '\{"mad":["angry","upset"]}' "http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english" and it worked.. I am going to try branch_9x... > 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