npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

solr-client

v0.10.0-rc10

Published

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

Downloads

26,121

Readme

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