Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
algoliasearch
Advanced tools
A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.
The algoliasearch npm package is a JavaScript client for Algolia, a hosted search API that provides a fast and accurate search experience for websites and mobile applications. The package allows developers to integrate Algolia's search capabilities into their JavaScript applications, enabling features such as full-text search, faceting, filtering, and geolocation queries.
Search
Perform a search query on an Algolia index and retrieve the results.
const algoliasearch = require('algoliasearch');
const client = algoliasearch('YourApplicationID', 'YourAdminAPIKey');
const index = client.initIndex('your_index_name');
index.search('query string').then(({ hits }) => {
console.log(hits);
});
Indexing
Add or update a record in an Algolia index.
const algoliasearch = require('algoliasearch');
const client = algoliasearch('YourApplicationID', 'YourAdminAPIKey');
const index = client.initIndex('your_index_name');
index.saveObject({ objectID: '1', name: 'Foo' }).then(() => {
console.log('Object indexed');
});
Configure Index Settings
Configure settings of an Algolia index to define ranking, attributes for faceting, etc.
const algoliasearch = require('algoliasearch');
const client = algoliasearch('YourApplicationID', 'YourAdminAPIKey');
const index = client.initIndex('your_index_name');
index.setSettings({
searchableAttributes: ['name', 'description'],
customRanking: ['desc(popularity)']
}).then(() => {
console.log('Settings updated');
});
Manage Indices
List all indices in your Algolia application and manage them.
const algoliasearch = require('algoliasearch');
const client = algoliasearch('YourApplicationID', 'YourAdminAPIKey');
client.listIndices().then(({ items }) => {
console.log(items);
});
Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. The elasticsearch npm package is the official Elasticsearch client for Node.js. It provides similar search capabilities but is typically self-hosted, unlike Algolia which is a managed service.
Solr-node is a client library for interacting with Apache Solr, which is an open-source search platform. Similar to Algolia, it provides full-text search, but it requires self-hosting and manual scaling, whereas Algolia offers a fully managed service.
Typesense is an open-source, typo-tolerant search engine that provides a similar developer experience to Algolia. The typesense npm package allows you to integrate Typesense into your JavaScript applications. It is designed to be easy to use and deploy, offering an alternative to Algolia with a focus on simplicity and speed.
FAQs
A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.
The npm package algoliasearch receives a total of 751,216 weekly downloads. As such, algoliasearch popularity was classified as popular.
We found that algoliasearch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.