🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

solrjs

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solrjs

SOLR Client for Node

0.7.1
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

solrjs

Simple Solr Client for Node

The client provides provide simple access to the SOLR HTTP API for querying, get (realtime get or via search), and updates.

Additional, the include rql module allows SOLR queries to be generated from RQL Queries and to use the RQL Query builder for chained query contruction

Installation

> npm install solrjs

Example Usage

var solr = require("solrjs");

var client = new solr("http://localhost:8983/solr",{});

client.query("q=*:*").then(function(results){
	console.log("Results: ", results);
},function(err){
	console.error("Error in Query: ", err);
});

Using the Query Builder

var Query = require("solrjs/rql");

// from an rql string
var q = new Query("?eq(foo,bar)&sort(-foo)").toSolr();

// using the builder
var q = new Query().eq('foo','bar').sort('-foo').toSolr();

client.query(q).then(function(results){
	console.log("Results: ", results);
});

Client API

  • query
  • get
  • update

FAQs

Package last updated on 18 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts