Support for Lyra JS
paulocoutinhox opened this issue · comments
Hi,
I have a suggestion to a feature.
You can use Lyra JS (https://lyrajs.io/) that is a javascript engine for document index like elasticsearch and you don't need WebAssembly.
import { create, insert, search } from "@lyrasearch/lyra";
const db = await create({
schema: {
quote: "string",
author: "string",
}
});
await insert(db, {
quote: "I feel as if I'm always on the verge of waking up",
author: "Fernando Pessoa"
});
const results = await search(db, {
term: "waking up"
});
Maybe the plugin can create the index and the JS search function can use it.
I always envisioned that this plugin could eventually have a setting that allows the user to choose their preferred search engine. So while I originally chose Stork because it is an excellent search engine, if anyone wants to submit a pull request that adds support for alternative search engines, I think that such enhancements would be useful additions to the project.
I'm closing this issue in favor of #35, which is more broadly-focused on alternatives to Stork.