Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
This project is an attempt at making Solr searches a little easier. I'm sure I'm not the only person that's struggled with trying to build a correct query string for Solr.
This is an in-progress project. For now, only Solr /search and /update is supported.
npm install solr-query
const Client = require( 'solr-query' );
const solrC = new Client();
solrC.search( searchQuery, searchOptions );
newRequest.save( obj )
.then( data => {
console.log( "data:", data );
} ).catch( err => {
console.log( "err:", err );
} );
When spawning a new Client object, you may pass in options to connect to your instance of Solr. The optional parameters are listed in the config folder.
This will accept a variety of options. It can be a string, an array, or an object. There are a combination of possibilities with Objects. If your search query is: q=Money AND (USD OR GBP)
, you can pass an object of:
searchQuery = {
'$and' : [ 'Money', { '$or' : [ 'USD', 'GBP' ] } ]
}
options.logging( function );
( You may pass in any function, or console.log
to print to console.)
This will output the request
object that will be sent. It should allow you to see the URL
, Method
, and qs
parameters.
options.commonParams
This is where you would pass in any solr-specific query parameters that do not need formatted.
For example:
?qf=contents&limit=100
would be passed as
options.commonParams = {
'qf' : 'contents',
'limit' : 100
};
Please note, if you pass a q
parameter into this, it will override the searchQuery
that is passed in.
This currently accepts a json object that will be entered verbatim into Solr.
solrObj = {
"title" : "Kinda Cool",
"uid" : "b5546172-713a-44f8-9105-761158ca75d9"
}
npm test
FAQs
An attempt to make solr searches a little more user-friendly
The npm package solr-query receives a total of 1 weekly downloads. As such, solr-query popularity was classified as not popular.
We found that solr-query 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.