Skip to content

Elasticsearch nested query for registration fails when second registration added #3167

@bhalsey

Description

@bhalsey

Elasticsearch nested query for registration fails when second registration added

Description

It has been observed that a nested query for users registered to an application is not returning complete results.

The query is essentially of the form (but also using pagination and sorted fields):

"search": {
    "query": "{\"nested\":{\"path\":\"registrations\",\"query\":{\"bool\":{\"must\":[{\"match\":{\"registrations.applicationId\":\"{{applicationId1}}\"}}]}}}}"
  }
}

A user that is known to be registered to application1 is not returned in the results. This user is registered to a second application, and they are returned when the above query uses applicationId2.

A clear and concise description of what the bug is.

Observed versions

1.55.1

Steps to reproduce

It is unclear how to reproduce this. Possibly a race condition.

Expected behavior

The user should be returned in nested queries for either application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions