Sorry for the late reply, traveling yesterday... That is odd on the surface of it. Try tailing out the solr log when you fire your SolrJ query to make sure the query even gets to Solr, perhaps something about how you try to route it goes to a place you don't intend...
I'm guessing it's just a copy/paste error, but I do notice that in the URL you pasted, your field is "name", whereas in the SolrJ fragment it's "indexname" Best, Erick On Wed, Oct 23, 2013 at 10:04 PM, YouPeng Yang <yypvsxf19870...@gmail.com>wrote: > Hi Erick > > It can get hits on this documents. > And I try this : > > > myhost/solr/mycore/update?stream.body=<delete><query>name:shardTv_20131010</query></delete>&commit=true > the document could be deleted. > > > Regards > > > 2013/10/23 Erick Erickson <erickerick...@gmail.com> > > > The first thing I'd do is go in to the browser UI and make sure you can > get > > hits on documents, something like > > blah/collection/q=indexname:shardTv_20131010 > > > > Best, > > Erick > > > > > > On Wed, Oct 23, 2013 at 8:20 AM, YouPeng Yang <yypvsxf19870...@gmail.com > > >wrote: > > > > > Hi > > > I am using SolrCloud withing solr 4.4 ,and I try the SolrJ API > > > deleteByQuery to delete the Index as : > > > CloudSolrServer cloudServer = new CloudSolrServer(myZKhost) > > > cloudServer.connect() > > > cloudServer.setDefaultCollection > > > cloudServer.deleteByQuery("indexname:shardTv_20131010"); > > > cloudServer.commit(); > > > > > > It seems not to work. > > > I also have do some google,unfortunately there is no help. > > > > > > Do I miss anything? > > > > > > > > > Thanks > > > > > > Regard > > > > > >