Giter VIP home page Giter VIP logo

Comments (3)

flobernd avatar flobernd commented on June 4, 2024

Hey @baveryt, could you please include the JSON payloads for the request (and response, if possible)? They should be included in the exception after calling DisableDirectStreaming() on your ElasticSearchSettings instance.

from elasticsearch-net.

baveryt avatar baveryt commented on June 4, 2024

@flobernd - The call actually does not throw an exception, it just reports that it was an invalid request. I'll include what I can here
Original Code:

var gir = new GetIndexRequest("search_*") {
      Features = new List<Feature>() {
          Feature.Aliases
      }
  };
  var response = Client.Indices.Get(gir);

The response reports back IsValidResponse = false. The Debug information shows:

"Invalid Elasticsearch response built from a unsuccessful (400) low level call on GET: /search_%2A?features=System.Collections.Generic.List%601%5BElastic.Clients.Elasticsearch.IndexManagement.Feature%5D 
 Exception: Request failed to execute. Call: Status code 400 from: GET /search_%2A?features=System.Collections.Generic.List%601%5BElastic.Clients.Elasticsearch.IndexManagement.Feature%5D. ServerError: Type: illegal_argument_exception Reason: \"Invalid features specified [System.Collections.Generic.List`1[Elastic.Clients.Elasticsearch.IndexManagement.Feature]]\"

# Audit trail of this API call: 
 - [1] BadResponse: Node: https://localhost:9200/ Took: 00:00:00.0049380
# OriginalException: Elastic.Transport.TransportException: Request failed to execute. Call: Status code 400 from: GET /search_%2A?features=System.Collections.Generic.List%601%5BElastic.Clients.Elasticsearch.IndexManagement.Feature%5D. ServerError: Type: illegal_argument_exception Reason: \"Invalid features specified [System.Collections.Generic....

The ElasticsearchServerError shows:

"Invalid features specified [System.Collections.Generic.List`1[Elastic.Clients.Elasticsearch.IndexManagement.Feature]]"

It's all pointing to the Features list couldn't be converted properly, it should have built the request like: GET /search_%2A?features=aliases

You will also see a similar problem if you do something similar to the ExpandWildcards property.

from elasticsearch-net.

flobernd avatar flobernd commented on June 4, 2024

Thanks for the additional details! It indeed seems like building the query argument fails for some cases when the argument is a collection.

from elasticsearch-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.