Changing elastic endpoint for elasticsearch-js client

We expose elasticsearch to client applications via our custom api service; our endpoint is /search instead of /_search that elasticsearch.js client expects. How do I tell the elasticsearch.js client to use /search endpoint? I only see an option to provide the host url, not the actual endpoint.

In other words, if I specify host as 'myelastic.com' then the elasticsearch.js client will post the queries to http://myelastic.com/_search and I need it to post queries to http://myelastic.com/search (no underscore)

Don't use the client if it's not an elasticsearch server but your own application.

I don't understand what you are doing TBH.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.