Introducing new developer-friendly pricing
Hey there, developers! At Algolia, we believe everyone should have the opportunity to bring a best-in-class search experience ...
VP of Product Growth
Hey there, developers! At Algolia, we believe everyone should have the opportunity to bring a best-in-class search experience ...
VP of Product Growth
Eye-catching mannequins. Bright, colorful signage. Soothing interior design. Exquisite product displays. In short, amazing store merchandising. For shoppers in ...
Search and Discovery writer
Ingesting data should be easy, but all too often, it can be anything but. Data can come in many different ...
Staff Product Manager, Data Connectivity
Everyday there are new messages in the market about what technology to buy, how to position your company against the ...
Chief Strategic Business Development Officer
Done any shopping on an ecommerce website lately? If so, you know a smooth online shopper experience is not optional ...
Sr. SEO Web Digital Marketing Manager
It’s hard to imagine having to think about Black Friday less than 4 months out from the previous one ...
Chief Strategic Business Development Officer
What happens if an online shopper arrives on your ecommerce site and: Your navigation provides no obvious or helpful direction ...
Search and Discovery writer
In part 1 of this blog-post series, we looked at app interface design obstacles in the mobile search experience ...
Sr. SEO Web Digital Marketing Manager
In part 1 of this series on mobile UX design, we talked about how designing a successful search user experience ...
Sr. SEO Web Digital Marketing Manager
Welcome to our three-part series on creating winning search UX design for your mobile app! This post identifies developer ...
Sr. SEO Web Digital Marketing Manager
National No Code Day falls on March 11th in the United States to encourage more people to build things online ...
Consulting powerhouse McKinsey is bullish on AI. Their forecasting estimates that AI could add around 16 percent to global GDP ...
Chief Revenue Officer at Algolia
How do you sell a product when your customers can’t assess it in person: pick it up, feel what ...
Search and Discovery writer
It is clear that for online businesses and especially for Marketplaces, content discovery can be especially challenging due to the ...
Chief Product Officer
This 2-part feature dives into the transformational journey made by digital merchandising to drive positive ecommerce experiences. Part 1 ...
Director of Product Marketing, Ecommerce
A social media user is shown snapshots of people he may know based on face-recognition technology and asked if ...
Search and Discovery writer
How’s your company’s organizational knowledge holding up? In other words, if an employee were to leave, would they ...
Search and Discovery writer
Recommendations can make or break an online shopping experience. In a world full of endless choices and infinite scrolling, recommendations ...
Mar 11th 2020 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