Skip to content

erfanium/deno_sonic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deno_sonic

Sonic search engine driver for Deno. With async support.

Status

Implemented parts

  • search mode (query, suggest)
  • ingest mode (push, pop, count, flush)

Not implemented parts

Check bug issues.

Example

import { Search } from "../mod.ts";

const search = new Search();

// search.client.debug = (...f) => console.debug(...f);

await search.connect({
  hostname: "127.0.0.1",
  port: 1491,
  password: "SecretPassword",
});

console.log("Connected");

const result = await search.query({
  collection: "messages",
  bucket: "default",
  terms: "Dragon",
});

console.log(result);

search.close();