
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
adonis-v5-elasticsearch
Advanced tools
Elasticsearch Service Provider for AdonisJS v5 with additional features
This service provider makes it easier to integrate and to work with the official Elasticsearch client library for Node.js
It is built on top of @elastic/elasticsearch and proxies all the methods keeping them 100% original. So you can follow official Elasticsearch API reference.
npm install adonis-v5-elasticsearch
Make sure you set the ELASTIC_SEARCH_URL environment variable in your .env file. This will be used to access your Elasticsearch server.
ELASTIC_SEARCH_URL=http://localhost:9200
Make sure to register the provider inside .adonisrc.json file.
{
// ...
"providers": {
// "...",
"adonis-v5-elasticsearch/providers/ElasticProvider"
},
// ...
}
That's all! Now you can use the provider by pulling it from IoC container
import { ApiResponse } from "@elastic/elasticsearch";
import Elastic from "@ioc:Elastic";
const response: ApiResponse = await Elastic.search({
index: "my-index",
body: {
query: {
match_all: {},
},
},
});
The Elastic.paginate() helper will paginate the results and return the same payload as Lucid's pagination method.
import { ApiResponse } from "@elastic/elasticsearch";
import Elastic from "@ioc:Elastic";
const response: ApiResponse = await Elastic.search({
index: "my-index",
body: {
query: {
match_all: {},
},
},
});
return Elastic.paginate(response);
You are more than welcome to contribute to adonis-v5-elasticsearch. Just submit changes via pull request and I will review them before merging.
Fork it! 🤙
Create your feature branch: git checkout -b my-new-feature
Commit your changes: git commit -am "Add some feature"
Push to the branch: git push origin my-new-feature
Submit a pull request 👍
The Adonis Elasticsearch Service Provider is MIT licensed.
FAQs
Elasticsearch Service Provider for AdonisJS v5 with additional features
We found that adonis-v5-elasticsearch 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.