Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Solr module for Node.js
*** Note! *** I have no active Solr projects at this time and would be happy to *** hand maintenance of node-solr off to someone more invested. Send *** me a message and I'll redirect people to your fork.
Node.js: http://github.com/joyent/node Solr: http://lucene.apache.org/solr/
Run tests with npm test
. Edit "test/common.js" if you don't have Solr
running at 127.0.0.1:8983.
See tests for usage. Here's a quick example:
var solr = require('solr');
var client = solr.createClient();
var doc1 = {
id: '1',
title_t: 'Foo bar',
text_t: 'Fizz buzz frizzle'
};
var doc2 = {
id: '2',
title_t: 'Far boo',
text_t: 'Wuzz fizz drizzle'
};
client.add(doc1, function(err) {
if (err) throw err;
console.log('First document added');
client.add(doc2, function(err) {
if (err) throw err;
console.log('Second document added');
client.commit(function(err) {
var query = 'text_t:fizz'
client.query(query, function(err, response) {
if (err) throw err;
var responseObj = JSON.parse(response);
console.log('A search for "' + query + '" returned ' +
responseObj.response.numFound + ' documents.');
console.log('First doc title: ' +
responseObj.response.docs[0].title_t);
console.log('Second doc title: ' +
responseObj.response.docs[1].title_t);
client.del(null, query, function(err, response) {
if (err) throw err;
console.log('Deleted all docs matching query "' + query + '"');
client.commit()
});
});
});
});
});
Solr add/replace documents supports optional parameters.
var doc1 = {
id: '1',
title_t: {
params: {
boost: '2.0'
},
value: 'Foo bar',
},
text_t: 'Fizz buzz frizzle'
};
FAQs
A low-level Solr client
The npm package solr receives a total of 138 weekly downloads. As such, solr popularity was classified as not popular.
We found that solr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.