In order to clear all the indexed data please try to use this code
 private void Btn_Delete_Click(object sender, EventArgs e)
        {
          
            var solrUrl = this.textBoxSolrUrl.Text;
            indexer.FixtureSetup(solrUrl);
            indexer.Delete();

            MessageBox.Show("Delete of files is completed");
        }

 public void Delete()
        {
            var solr =
ServiceLocator.Current.GetInstance<ISolrOperations&lt;Document>>();

            solr.Delete(new SolrQueryByField("id", "*:*"));

            solr.Commit();
        }

 Use this code to delete indivisual document

 solr.Delete(new SolrQueryByField("id", "SP2514N"));

Here particular id="SP2514N" will be removed from the Indexed data. 

--
View this message in context: 
http://lucene.472066.n3.nabble.com/delete-by-query-don-t-work-tp3990077p3990243.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to