Feature Spotlight: Query Rules
You’re running an ecommerce site for an electronics retailer, and you’re seeing in your analytics that users keep ...
Technical Writer
You’re running an ecommerce site for an electronics retailer, and you’re seeing in your analytics that users keep ...
Technical Writer
What do OpenAI and DeepMind have in common? Give up? These innovative organizations both utilize technology known as transformer models ...
Sr. SEO Web Digital Marketing Manager
As a successful in-store boutique manager in 1994, you might have had your merchandisers adorn your street-facing storefront ...
Search and Discovery writer
At Algolia, our business is more than search and discovery, it’s the continuous improvement of site search. If you ...
JavaScript Library Developer
Analytics brings math and data into the otherwise very subjective world of ecommerce. It helps companies quantify how well their ...
Technical Writer
Amid all the momentous developments in the generative AI data space, are you a data scientist struggling to make sense ...
Sr. SEO Web Digital Marketing Manager
Fashion ideas for guest aunt informal summer wedding Funny movie to get my bored high-schoolers off their addictive gaming ...
Sr. SEO Web Digital Marketing Manager
Imagine you're visiting an online art gallery and a specific painting catches your eye. You'd like to find ...
Senior Software Engineer
At Algolia, our commitment to making a positive impact extends far beyond the digital landscape. We believe in the power ...
Senior Manager, People Success
In today’s post-pandemic-yet-still-super-competitive retail landscape, gaining, keeping, and converting ecommerce customers is no easy ...
Sr. SEO Web Digital Marketing Manager
There are few atmospheres as unique as that of a conference exhibit hall: the air always filled with an indescribable ...
Marketing Content Manager
To consider the question of what vectors are, it helps to be a mathematician, or at least someone who’s ...
Search and Discovery writer
My first foray into programming was writing Python on a Raspberry Pi to flicker some LED lights — it wasn’t ...
Technical Writer
How well do you know the world of modern ecommerce? With retail ecommerce sales having exceeded $5.7 trillion worldwide ...
Sr. SEO Web Digital Marketing Manager
In a world of artificial intelligence (AI), data serves as the foundation for machine learning (ML) models to identify trends ...
Director of AI Engineering
Imagine you’re a leading healthcare provider that performs extensive data collection as part of your patient management. You’re ...
Search and Discovery writer
In an era where customer experience reigns supreme, achieving digital excellence is a worthy goal for retail leaders. But what ...
Marketing Content Manager
Just a few years ago it would have required considerable resources to build a new AI service from scratch. Of ...
VP, Engineering
Early February, we released the Algolia API Client JavaScript v4, our most powerful JavaScript client ever. It’s faster, smaller, and more flexible, and provides full support for our Common API Client specifications. Significantly, it includes previously unavailable methods like zero-downtime reindexing, cross-account operations, and many other complex operations.
The good news is that it involves only minimal changes to the API, so updating should take less than ten minutes: Upgrade Guide.
In this article, we’ll highlight some of the main advances in this brand new version.
Our new client comes packed with new features; yet, despite these additions, it’s actually smaller compared to v3:
That amounts to a combined 64% size decrease compared to the previous version. With this decrease, your page loads faster.
Also, we’ve reduced the number of dependencies from 15 to 0. Yes, that’s right – 0 dependencies. So we no longer take the risk of receiving third-party updates that might break the client.
To provide the best developer experience, we’ve added a bunch of new helpers that aren’t just a simple mapping to API endpoints. Users are now able to `replaceAllObjects` with zero downtime, or `copyIndex` between apps, and many other such multi-task operations! Here are some examples:
For optimal developer experience and type safety, the new client is fully written in TypeScript. Thanks to this, the developer will be able to leverage optional static typing and type inference out of the box.
Just like v3, we ship with two versions: lite and default – these are predefined versions that help developers get started quickly using the traditional: “algoliasearch(appId,apiKey)”.
Now, thanks to a brand new architecture, you can build your own version of the client, adapted to your needs. Here is an example:
With this approach, developers can inject their own requester and logger, as well as their own cache implementations. Good news is that, even if you inject your concrete implementations, everything still runs under our retry strategy.
We believe this modularity helps developers meet the demands of more advanced use cases.
The Algolia API Client JavaScript is 100% open source, so feel free to dig through the source code to see exactly how it works. Dig right in! Visit our documentation.
See something that needs to be improved? Just send us a pull request on GitHub. Thanks! And we hope you enjoy this new release! 🎉
Powered by Algolia Recommend