Welcome to the community! If you're looking to connect to Elasticsearch and do operations such as index management and querying within your JavaScript app, then it is Elasticsearch Node.js client that you need (i.e. the first one):
The second one is for Elastic App and Workplace Search rather than vanilla Elasticsearch.
No worries at all @cosieLq ! It can be a bit confusing so I'm happy to elaborate.
App Search is a set of additional tools built on top of Elasticsearch to make it easier for enterprises to build search experiences quicker. So if you have a look at the documentation it includes tools such as the web crawler. I would recommend having a look at the guides to get a feel of what tools are in there.
I hope that is a bit clearer. If not, feel free to let us know what you're trying to do with Elasticsearch and we can try to help. But when you mentioned you want to connect to Elasticsearch directly within a Node.js app it sounded like the Elasticsearch Node.js client was the right one for you.
@carly.richmond I've checked the documentation that you sent and our tech stack. It turns out that we're using Elastic App Search. Therefore, in our case, I should use this package as our client: enterprise-search-js. Did I understand it correctly?
But it seems not much is going on with this package on GitHub. Is this package actively being maintained and updated?
Can you say a bit more about what you're trying to do within your Node.js app with Elastic App Search? To best confirm which client to use I need a bit more information.
Yes! I'm trying to conduct search such as querying and looking for suggestions.
We use Next.js as the front-end of our website. Because we want to connect to Elastic from the front-end server instead of from the browser, it'll be a Node.js environment.
Thanks for confirming. Looking at the activity on the enterprise search client I agree with your concern regarding recent updates.
My general advise is if you need to use specific features of App search as covered in the docs use the enterprise client, but for vanilla searching it might be worth using the generic Javascript client.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.