
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
redisearchfuzzy
Advanced tools
Simple Node Interface for RediSearch indexes. Implemented for RediSearch 2.x
RediSearchFuzzy
Simple Node Interface for RediSearch indexes. Implemented for RediSearch 2.x
This library was created as an interface for RediSearch 2+ version for Nodejs. It provides a simple Node API to create, remove and interact with RediSearch's Secondary Indexing. It also provides an additional functionality for Searching with Fuzzy strings. This library uses Promises and therefore supports ES6 async implementation over callbacks.
Please note, that this library does not contain ALL of RediSearch features and thus contributions are welcome.
npm install redisearchfuzzy
Initiating the RediSearchFuzzy Client and passing existing Redis Client to it:
const myRedisClient = require("redis").createClient();
const { RediSearchFuzzy } = require("redisearchfuzzy");
const RedisFuzzy = new RediSearchFuzzy(myRedisClient);
Now we can call the functions from RedisFuzzy instance.
const INDEX_NAME = "PRODUCTS";
RedisFuzzy.createIndexList({
indexName: INDEX_NAME,
schema: [{ field: "title" }, { field: "body" }],
options: ["PAYLOAD_FIELD", "myPayload"],
});
RedisFuzzy.addDocument("product:1", {
title: "My favorite zebra",
body: "A zebra's dazzling stripes make them among the most recognisable mammals",
myPayload: `{ data: "hello1" }`,
});
RedisFuzzy.addDocument("product:2", {
title: "My favorite snake cobra",
body: "Venomous and many are capable of rearing upwards and producing a hood when threatened",
myPayload: `{ data: "hello2" }`,
});
// Search in our index:
const searchIndex = async () => {
// with Fuzzy option
const resultFuzzy = await Fuzzy.searchDocuments({ indexName: INDEX_NAME, query: "Venom", useFuzzy: true });
// without Fuzzy option
const result = await Fuzzy.searchDocuments({ indexName: INDEX_NAME, query: "Venom" });
};
searchIndex();
RediSearchFuzzy instance contains:
FAQs
Simple Node Interface for RediSearch indexes. Implemented for RediSearch 2.x
The npm package redisearchfuzzy receives a total of 295 weekly downloads. As such, redisearchfuzzy popularity was classified as not popular.
We found that redisearchfuzzy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.