Skip to content
master
Switch branches/tags
Code

Latest commit

…nimally. (#288)

* Convert require to import in sassert.ts

* Convert require to import in utils-test.ts

* Convert `require` to `import` in add-test.ts and fix tests.

* Convert `require` to `import` in bigint-test.ts

* Convert `require` to `import` in commit-test.ts and fix tests.

* Convert `require` to `import` in core-query-test.ts and fix tests.

* Convert `require` to `import` in createAddStream-test.ts and fix tests.

* Convert `require` to `import` in createClient-test.ts and fix tests.

* Convert `require` to `import` in delete-test.ts and fix tests.

* Convert `require` to `import` in deleteAll-test.ts

* Convert `require` to `import` in deleteById-test.ts and fix tests

* Convert `require` to `import` in deleteByQuery-test.ts and fix tests

* Convert `require` to `import` in deleteByRange-test.ts and fix tests

* Convert `require` to `import` in dismax-query-test.ts

* Convert `require` to `import` in facet-query-test.ts and fix tests.

* Convert `require` to `import` in get-test.ts

* Convert `require` to `import` in group-query-test.ts

* Convert `require` to `import` in highlight-query-test.ts and fix types

* Convert `require` to `import` in mlt-query-test.ts and fix types

* Convert `require` to `import` in optimize-test.ts and fix tests

* Convert `require` to `import` in ping-test.ts

* Convert `require` to `import` in prepareCommit-test.ts

* Convert `require` to `import` in rangeFilter-test.ts

* Convert `require` to `import` in realTimeGet-test.ts

* Convert `require` to `import` in rollback-test.ts

* Convert `require` to `import` in search-test.ts

* Convert `require` to `import` in searchAll-test.ts

* Convert `require` to `import` in softCommit-test.ts

* Convert `require` to `import` in spell-test.ts

* Convert `require` to `import` in update-test.ts

* Convert `require` to `import` in terms-query-test.ts

* Convert `require` to `import` in update-test.ts

* Convert `require` to `import` in collectionAdmin-test.ts and fix tests and types.
788a03e

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

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

// Create a client
const 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);
   }
});

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

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