Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
node-solr-lambda
Advanced tools
Readme
axios
const { prepareSolrClient } = require("node-solr-lambda");
const solr = prepareSolrClient("mycore");
async function myfun() {
const result = await solr.query({ query: "label:something" });
console.log(result);
await solr.addField({ name: "price", type: "plong", multiValued: false });
await solr.addField({
name: "category",
type: "string",
multiValued: true,
docValues: true
});
const item1 = { id: "item1", price: 123, category: ["cpu", "ram"] };
const item2 = { id: "item2", price: 456, category: ["cpu", "usb"] };
await solr.add(item1); // works with single object
await solr.add([item1, item2]); // works with object[]
await solr.commit()
await solr.query({
query: "*:*",
facet: {
top_5_categories: {
terms: {
field: "category",
limit: 5,
facet: {
avg_price: "avg(price)"
}
}
}
}
});
}
We provide a docker-compose with a solr instance for testing. The testing solr instance needs to run first:
# run this in a separate terminal and shutdown using CTRL+C
yarn test:prepare
Now you can run the test suite:
yarn test
FAQs
Minimalistic Solr client written in functional programming style
The npm package node-solr-lambda receives a total of 0 weekly downloads. As such, node-solr-lambda popularity was classified as not popular.
We found that node-solr-lambda demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.