algoliasearch-client-javascript

? Algolia Search API Client for JavaScript platforms

Github星跟踪图

✨ Features

  • Thin & minimal low-level HTTP client to interact with Algolia's API
  • Works both on the browser and node.js
  • UMD compatible, you can use it with any module loader
  • Built with TypeScript

? Getting Started

First, install Algolia JavaScript API Client via the npm package manager:

npm install algoliasearch

Then, create objects on your index:

const algoliasearch = require("algoliasearch");

const client = algoliasearch("YourApplicationID", "YourAdminAPIKey");
const index = client.initIndex("your_index_name");

const objects = [
  {
    objectID: 1,
    name: "Foo"
  }
];

index
  .saveObjects(objects)
  .then(({ objectIDs }) => {
    console.log(objectIDs);
  })
  .catch(err => {
    console.log(err);
  });

Finally, let's actually search using the search method:

index
  .search("Fo")
  .then(({ hits }) => {
    console.log(hits);
  })
  .catch(err => {
    console.log(err);
  });

For full documentation, visit the online documentation.

? License

Algolia JavaScript API Client is an open-sourced software licensed under the MIT license.

主要指标

概览
名称与所有者algolia/algoliasearch-client-javascript
主编程语言TypeScript
编程语言HTML (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2013-05-20 14:35:15
推送于2025-05-20 12:54:46
最后一次提交
发布数425
最新版本名称5.25.0 (发布于 )
第一版名称2.0.0 (发布于 2013-10-07 16:55:16)
用户参与
星数1.4k
关注者数100
派生数223
提交数1.2k
已启用问题?
问题数474
打开的问题数16
拉请求数476
打开的拉请求数4
关闭的拉请求数605
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?