Skip to content

Count with no body sends POST, but could send GET #2540

@dzmitry-lahoda

Description

@dzmitry-lahoda

I use NEST 2.4.6 to get count:

var count = this.elasticClient.Count<T>(x => x.Index("myindex").Type<T>()).Count;

It sends POST with

{}

I believe it could send GET in this case. This may be fruitful if my credentials prevent POST, but I still need some overall count for application side optimizations/estimates and I do not want to go low level and POST adds slightly more performance overhead above GET and I want to copy/paste NEST debug output my browser. I believe it is possible to infer that it may be GET, not POST.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions