Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
solr-query
Advanced tools
Readme
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 4 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.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.