Skip to content

8.15 - What is the intended method to use the .MatchAll() query? #8523

Closed
@TSlump

Description

@TSlump

Elastic.Clients.Elasticsearch version: 8.15.4

Elasticsearch version: 8.15.4

.NET runtime version: 8.0

Hi, I'm trying to get all docs from my elastic index but I'm having trouble with the .MatchAll query. I had imagined it would look like:

var searchResponse = await this.elasticsearchClient.SearchAsync<Model>(s => s
            .Index(Index)
            .Query(q => q
                .MatchAll()
            )); 

However it's asking for a MatchAllQueryDescriptor, I'm sure what I'm meant to put here...

I have a version working with:

.Query(new MatchAllQuery()

Is this the intended method to create a MatchAll query? Any guidance/docs would be be greatly appreciated, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions