wvl / solr-node-client

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

Home Page:https://github.com/lbdremy/solr-node-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Solr Client API

##Features

  • Support commands: Query, Delete, Update, Commit, Rollback, Optimize
  • Support Dismax Query Syntax
  • Support implicit conversion for Date Object to the supported format by Solr. More informations available about the Solr Date Format.

##History

  • !WARNING! On the v0.0.3 I standardized error handling in asynchronous functions by returning them as the first argument to the current function's callback and not as the second argument like it's was the case on version < 0.0.3. This modification can break you code have a look to your code before you update.

##Install npm install solr-client

##Get started // Dependency var solr = require('solr-client');

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

//Add
var doc = {
  field : 'value';
}
var callback = function(err,res){
  if(err) console.log(err);
  if(res) console.log(res);
}
client.add(doc,callback);
client.commit(callback);

##Test Before to run the test, start the Solr Server.

 vows --spec test/*

##Examples

Take a look in the folder examples.

About

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

https://github.com/lbdremy/solr-node-client

License:MIT License


Languages

Language:JavaScript 100.0%