Skip to content

Wrong index used for search in case another builder is initialises before the query is completed #10

Open
@sash

Description

@sash

Here is the setup:

  1. A builder on model A is initialised. The connection gets the index name (Model => newBaseQueryBuilder).
  2. Another builder for Model B is initialised
  3. The original builder performs a query

The model B index is used by the builder of model A since the connection is a shared resource

Proposed solution - use the builder->from to set the index to the builder on initialisation and then use that to set the connection index right before read/write

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions