1.0.8 • Published 4 years ago

kalasearch-javascript-sdk v1.0.8

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

kalasearch-javascript-sdk

KalaSearch JavaScript is a client for KalaSearch written in JavaScript. KalaSearch is a powerful, fast, open-source, easy to use and deploy search engine. Both searching and indexing are highly customizable.

🔧 Installation

Installing with npm:

npm install kalasearch-javascript-sdk

Installing with yarn:

yarn add kalasearch-javascript-sdk

🚀 Getting started

Here is a quickstart for a search request:

import { KalaSearch } from 'kalasearch-javascript-sdk'

const client = new KalaSearch({
  apiKey: 'your-apiKey',
  appId: 'your-appId'
})

async function f() {
  try {
    let response = await client.search('bill','some-index-id');
    console.log(response) // => see output below
  } catch(err) {
    console.log(err) // => catch error 
  }
}

f();

Output:

{
  "hits": [
    {
      "_id": "bxhrKnIBUGhMMzxQmktg",
      "_source": { "name": "bill" }
    }
    {
      "_id": "lp8gLnIB2RA_SQyqB57i",
      "_source": { "name": "bill gates" }
    }
  ],
  "queryTimeUsed": 1,
  "totoalHits":2
}

🎬 Examples

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago