lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffery Yuan <yuanyun...@gmail.com>
Subject How to suse solrJ to sned delete request to delete managed resource
Date Sun, 01 Jan 2017 22:00:41 GMT
I am trying to implement web services to managed stopwords and Synonyms in
our solr cloud servers.
https://cwiki.apache.org/confluence/display/solr/Managed+Resources
<https://cwiki.apache.org/confluence/display/solr/Managed+Resources
>  

I already implemented the add and get functions. But I have problem to
implement delete function.

My first thought is to use GenericSolrRequest, BUT
org.apache.solr.client.solrj.SolrRequest.METHOD only supports GET,POST,PUT, 
- not DELETE.

Then I tried to use solrj's httpclient - getSolrClient().getHttpClient() to
send a delete request. But this would require me to know the the solr server
url address.

Although I managed to get solr server using CloudSolrClient via
ZkStateReader, ClusterState, and then use getSolrClient().getHttpClient() to
delete stopWords.

I am wondering whether there are better ways to use solrJ send delete
request.

Thanks for your help.



--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-suse-solrJ-to-sned-delete-request-to-delete-managed-resource-tp4311899.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message