Skip to content

SourceMany unexpected behavior #4342

Closed
@Fylhtq42

Description

@Fylhtq42

NEST/Elasticsearch.Net version: 7.3.0

Elasticsearch version: 7.2

Description of the problem including expected versus actual behavior:
I used Nest.IElasticClient for search by SourceMany and found some
strange behavior. Api of method looks like you can send ids and you will get IEnumerable back. But if you send ["id1","id1","id1"] and Index contains one document with id = "id1", you will get 9 documents back instead of 3 for example. Because if you send multi get request to elastic api with 3 same ids you will get 3 documents in response. And I found that you have some join operation after elastic api response in MultiGetResponse.SourceMany, it creates duplicates.

Steps to reproduce:

  1. Save one document to index with Id = "id1"
  2. Call elasticClient.SourceMany(ids, IndexName);
    Ids = ["id1","id1","id1"]
  3. You get 9 documents back.

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