I am trying to use the Nest client to consume an Elasticsearch instance.
/_search endpoint is in fact
Is there any possible way to change the behavior of the client to reflect this change?
I have tried looking into the source code but just can't figure out a way this can be done.
Disclaimer: I have no control over the ES instance, neither I know if there is some sort of proxy in the middle that alters the
Thanks in advance.
No you can't do that IMO.
You could add another proxy on top of your proxy which rewrites
Well, I suppose I was expecting that kind of answer
So... There is no way I can change the
/_search path on the client?
I would not expect this to be possible.
Could you run the following requests on your cluster?
And share the outputs here?
I guess this is a "protected" environment of elasticsearch, where only some endpoints are available. I assume they only allow the
search route, which is basically
_search rewritten to
I'm trying to grab more information from the provider.
Could you share one typical output of a search request?
Hmmm. So it's an old version of elasticsearch...
What are the other APIs available?
What do you get back when you call something like:
Some extra information:
The version is 6.2.3.
It seems that the
/transcripts/search endpoint is not a "true" elasticsearch endpoint, but combines multiple information into one single endpoint. For example, while the transcript is a valid
Type, originally does not contain all the information that is returned in this endpoint.
Am I out of luck in using the NEST Client, even if I somehow can get them to make
I don't know this client.
In the LowLevel Java client you can call whatever endpoint so I guess this could work.
I don't know if the
Elasticsearch.Net client exposes similar low level GET/POST calls.
It does! I answered this same question on Stack Overflow:
I'll include it here for completeness.
/search is not an API endpoint in Elasticsearch. It is not possible to change the API endpoints within the client, without changing the API specs from which it is generated and recompiling.
You can use the low level client's
DoRequestAsync methods to call
a non-standard API.
With the 6.x or 7.x client (you should use the 6.x client with 6.2.3)
var client = new ElasticClient();
var request = new SearchRequest<LogMessage>
Query = new MatchQuery
Field = Infer.Field<LogMessage>(f => f.Level),
Query = "warning"
var response = client.LowLevel.DoRequest<SearchResponse<LogMessage>>(
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.