Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A solr client for node.js.

This branch is 121 commits behind lbdremy:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.gitignore
.npmignore
.travis.yml
LICENCE
README.markdown
main.js
package.json

README.markdown

solr-client - a node.js solr client

Install

npm install solr-client

Features

  • Commands supported: search(select), index, delete, update, commit, rollback, optimize, ping
  • Lucene query / DisMax query
  • Grouping / Field Collapsing. (Apache Solr version must be >= 3.3)
  • Convenients methods for querying with Facet, MoreLikeThis
  • HTTP Basic Access Authentication

Documentation

See the website at http://lbdremy.github.com/solr-node-client/.

Usage

// Load dependency
var solr = require('solr-client');

// Create a client
var client = solr.createClient();

// Add a new document
client.add({ id : 12, title_t : 'Hello' },function(err,obj){
   if(err){
      console.log(err);
   }else{
      console.log('Solr response:' + obj);
   }
});

Test

npm test

HTTP requests and responses expected are mocked thanks to nock. To disable the mocking go to test/config.json and set mocked to false.

Licence

(The MIT License) Copyright 2011-2012 HipSnip Limited

Something went wrong with that request. Please try again.