
Security News
Open VSX Begins Implementing Pre-Publish Security Checks After Repeated Supply Chain Incidents
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.
netaphor-search-client
Advanced tools
A module for easy communication with the Netaphor search API
A Node client for the Netaphor Search API.
##Contents
To include in node:
var neta4 = require('netaphor-search-client');
Creating a new connector:
var searchConnector = new neta4.Connector(config);
configan object with the following propertiesusername(String),password(String),clientId(String)
Query a hosted Solr search index
searchConnector.search(searchQuery, callback)
searchQuerythe full search query as a String or an object. If using a string be sure to include a "?" at the beginning.
callbacka callback function called when the search server responds which accepts two parameters;errorandresponse.responsebeing the body of the http response from the search server.
Add or modify data in the Solr search index
searchConnector.update(postData, callback)
postDataa String in either JSON or XML format used to update or populate the search index.
callbacka function called when the search server responds which accepts two parameters;errorandresponse.responsebeing the body of the http response from the search server.
Used to optimize the Solr search index
searchConnector.optimize(callback)
callbacka function called when the search server responds which accepts two parameters;errorandresponse.responsebeing the body of the http response from the search server.
Delete an item from the Solr search index using its id
searchConnector.update(itemId, callback)
itemIda String or Integer which is the items id
callbacka function called when the search server responds which accepts two parameters;errorandresponse.responsebeing the body of the http response from the search server.
Commit changes to the Solr search index
searchConnector.commit(callback)
callbacka function called when the search server responds which accepts two parameters;errorandresponse.responsebeing the body of the http response from the search server.
var neta4 = require('netaphor-search-client');
// Required parameters
var config = {
clientId: 'yourServerName',
username: 'should.be.an@email.com',
password: 'yourPassword'
};
// Create a new search connector
var neta4Search = new neta4.Connector(config);
// Load up some data
var data = fs.readFileSync('someData.xml');
// Send the data to the search index
neta4Search.update(data, function (error, response) {
if (error !== null) {
console.log('Error with request', error);
} else {
// Data successfully submitted
}
});
// Commit your search changes
neta4Search.commit(function (error, response) {
if (error !== null) {
console.log('Error with request', error);
} else {
// Changes commited to the index and ready to query
}
});
// Optimize the search index
neta4Search.optimize(function (error, response) {
if (error !== null) {
console.log('Error with request', error);
} else {
// Index optimized
}
});
// Search your index
neta4Search.search('?q=*:*&wt=json&qt=standard&rows=10&facet=true', function (error, response) {
if (error !== null) {
console.log('Error with request', error);
} else {
// Do stuff with the results
}
});
// Delete an item from the search index
neta4Search.deleteItem(itemId, function (error, response) {
if (error !== null) {
console.log('Error with request', error);
} else {
// Item marked for deletion, commit your changes to remove the item
}
});
FAQs
A module for easy communication with the Netaphor search API
The npm package netaphor-search-client receives a total of 0 weekly downloads. As such, netaphor-search-client popularity was classified as not popular.
We found that netaphor-search-client 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
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.