New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client does not support calling App Engine ElastiSearch _search api #8069
Comments
Hi @DR9885, this repository contains the Elasticsearch client. Enterprise Search and its App Search component is built on top of Elasticsearch, but is a completely dedicated product. The App Search API is not fully compatible with the Elasticsearch API which means that it will never be supported by this client. Creating a separate Enterprise Search client is on the roadmap for a while, but so far no progress has been made. |
Could you please show some code for option 2? For this particular endpoint I don't see a reason why it would not work with the Elasticsearch client. The request and response is mostly just redirected to/from the underlying Elasticsearch instance. You should be able to pass the full URI - including a path - to the ElasticsearchClientSettings or to the constructor of ElasticsearchClient without it being truncated. |
@flobernd Example Code
Error
|
Was able to override the check.
But have new error if I do that
It looks like these are request details being sent
Manual curl does work
C# HttpClient Also Works
|
@flobernd If I override the Authorization header it works, how can I change the header with nest client? Works: Authorization: Bearer fake-key or can we get the App Engine to accept ApiKey as a type? |
@flobernd
|
Full working hack
|
Thanks for providing a working hack! A similar workaround is probably possible with the 8.* client as well. For now, I'm going to close this issue as it's related to the Enterprise Search / AppSearch product and not Elasticsearch 🙂 |
Is your feature request related to a problem? Please describe.
C# client does not support calling app engine elastic search api
ref: https://www.elastic.co/guide/en/app-search/8.12/elasticsearch-search-api-reference.html
Describe the solution you'd like
To be able to pass the app engine to search against:
SearchAsync(x => x.Index("index").Engine("engine").Query())
Describe alternatives you've considered
Option 1 =>
Action: tried to pass url as the index ex: "api/as/v1/engines/example-engine/elasticsearch"
Result: this failed because was url encoded, so the path was incorrect.
caused by this: https://github.com/elastic/elasticsearch-net/blob/7.17/src/Nest/CommonAbstractions/Request/UrlLookup.cs#L59
Option 2 =>
Action: Add engine url route as hostname "https://fakehost-dev.ent.westus2.azure.elastic-cloud.com/api/as/v1/engines/example-engine/elasticsearch"
Result: This didn't work because it just got cut off.
Option 3 => Fork Repo, and add a way to do this.
The text was updated successfully, but these errors were encountered: