Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Solr module for Node.js
Failed to load latest commit information.
lib Added status code to error so client doesn't have to parse error mess…
test Dropped references to 'sys' and print
LICENSE Include current year in copyright
README Added maintenance note
package.json Version 0.2.2


Solr module for Node.js

*** Note!
*** I have no active Solr projects at this time and would be happy to
*** hand maintenance of node-solr off to someone more invested. Send
*** me a message and I'll redirect people to your fork.


Run tests with `npm test`. Edit "test/common.js" if you don't have Solr 
running at 

See tests for usage. Here's a quick example:

    var solr = require('solr');

    var client = solr.createClient();
    var doc1 = {
      id: '1',
      title_t: 'Foo bar',
      text_t: 'Fizz buzz frizzle'
    var doc2 = {
      id: '2',
      title_t: 'Far boo',
      text_t: 'Wuzz fizz drizzle'

    client.add(doc1, function(err) {
      if (err) throw err;
      console.log('First document added');
      client.add(doc2, function(err) {
        if (err) throw err;
        console.log('Second document added');
        client.commit(function(err) {
          var query = 'text_t:fizz'
          client.query(query, function(err, response) {
            if (err) throw err;
            var responseObj = JSON.parse(response);
            console.log('A search for "' + query + '" returned ' +
                responseObj.response.numFound + ' documents.');
            console.log('First doc title: ' + 
            console.log('Second doc title: ' + 
            client.del(null, query, function(err, response) {
              if (err) throw err;
              console.log('Deleted all docs matching query "' + query + '"');
Something went wrong with that request. Please try again.