[ https://issues.apache.org/jira/browse/SOLR-17613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945955#comment-17945955 ]
Eric Pugh commented on SOLR-17613: ---------------------------------- Okay, I think I see the problem.... When you created your techproducts config set, you didn't specify what configuration set to use, so you go the _default which I think doesn't have managed stopwords or schema configured. Try bin/solr create -c techproducts -n techproducts Instead. Are there any tweaks to the ref guide that would make that clearer? Also, the error message you get "Cannot invoke \"Object.hashCode()\" because \"key\" is null" does not make it clear that managed resource hasn't been set up at all! > 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