Solr client for node.js

A solr client for indexing, adding, deleting,committing and searching documents within an Apache Solr installation (version>=3.2).

Latest Update from Github

Loading...
Loading...

Delete set of documents

Hide Source
// Use `var solr = require('solr-client')` in your code 
var solr = require('./../lib/solr');

var client = solr.createClient();

var field = 'id';
var query = '*'; // Everything !Dangerous!

// Delete every documents
client.delete('id','*',function(err,obj){
   if(err){
   	console.log(err);
   }else{
   	console.log(obj);	
   }
});