• Stars
    star
    484
  • Rank 90,873 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A solr client for node.js.

solr-client - a node.js solr client

NPM Version NPM Downloads Gitter

Installation

Install the library with:

npm install solr-client

or

yarn add solr-client

Documentation

Node.js version 12+ is supported. Solr versions 3-8 are supported.

Usage (callback API in 0.9.0 and older)

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

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

// Add a new document
const obj = await client.add({ id : 12, title_t : 'Hello' });
console.log('Solr response:', obj);

Usage (promise API in 0.10.0+`)

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

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

// Add a new document
const obj = await client.add({ id : 12, title_t : 'Hello' });
console.log('Solr response:', obj);

Roadmap

v0.3.x - v0.x.x

  • Implement all features available in Solr 4 (SolrCloud API in particular)
  • Provide all low-level commands
  • Complete documentation

v1.0.x

  • First stable version
  • the API is frozen until v2.0.x, only new features and bug fixes can be introduced

Test

Tests are executed against a Solr instance in a Docker container.

To execute them on latest supported Solr version, run:

npm run solr:current:start
npm run test:current

If you want to execute them on oldest Solr version supported, run:

npm run solr:legacy:start
npm run test:legacy

Windows 10 and Docker

Windows 10 Pro or Enterprise

If you have a version of Windows 10 Pro or Enterprise, simply download Docker Desktop. Ensure that Hyper-V is enabled, and virtualization is enabled in your motherboard's BIOS. It may prompt you to install updates to Windows during Docker Desktop installation and then restart the system.

Windows 10 Home

If you have a version of Windows 10 Home, a little more effort is needed. By default, Hyper-V cannot be turned on for Home edition. The steps that seem to work:

  • Check to ensure you have WSL1, WSL2, and the Kernel Update. This can be done using the shell commands found [here](https://blog.devgenius.io installing-docker-onwindows-10-home-edition-2e7c1b79d76d).
  • Follow the instructions in this link to install Hyper-V. Please note, that you must have WSL1/WSL2 and the update for Hyper-V to install properly or the changes may be undone during restart.
  • After restarting and checking that Hyper-V is enabled, you may install Docker Desktop using the setup wizard.

Test coverage

Before to be able to run the command below, you will need to install jscoverage available here.

npm run-script test-cov

This command will generate a file named coverage.html, use your browser to visualize it.

Static analysis and complexity report

npm run-script report

Licence

(The MIT License)

Copyright 2011-2012 HipSnip Limited Copyright 2013-2014 Rémy Loubradou

More Repositories

1

node-csv-stream

Simple CSV stream for node.js
JavaScript
46
star
2

gedit-jade

Gedit Highlighting for Jade
25
star
3

scrapinode

content driven and route based scraper
JavaScript
14
star
4

solr-install

[not maintained] Setup Solr and Jetty for Debian & RedHat distributions
Shell
13
star
5

rs-mvc-example

MVC example using Rust with Iron framework.
Rust
10
star
6

redis-install

[not maintained] Script to install redis
Shell
8
star
7

prixing-node-client

A Prixing API library. Prixing is a product comparator service based on bar code to find the lowest prices.
JavaScript
6
star
8

grunt-cordova-cli

Run cordova commands as grunt tasks
JavaScript
6
star
9

apa-node-client

An Amazon Product Advertising API client for node.js.
JavaScript
4
star
10

node-httperror

HTTPError class extends Error (stack in). var err = new HTTPError(req,res,message);
JavaScript
4
star
11

premailer-node-client

Premailer API client for node.js
JavaScript
3
star
12

superconsole

Prepends handy informations before your logs when you wish.(timestamp, callsite, log level)
JavaScript
2
star
13

tusk

documentation generator tool for node.js libraries (work in progress)
JavaScript
1
star
14

Bar

Bar is an android application. Bar allows to convert temperature, weight, volume and distance very quickly and easily.
Java
1
star
15

prefixer

Convert infix arithmetic expression to prefix expression
Java
1
star
16

actionbar

Action Bar Android used for my application Bar
Java
1
star
17

node-kickstarter-client

A kickstarter client for its undocumented API.
JavaScript
1
star
18

isitworththetime

Is it worth the time ? XKCD
JavaScript
1
star