Skip to content

Get document API can specify an alias, but will return documents that are not part of that alias (as defined by the filter for that alias) #3861

Closed
@ccw-morris

Description

@ccw-morris

Create an index and populate it with two documents. Create an aliases with a filter, such that the alias contains one document.

A search using the alias will return one result.
A get document request using the alias can retrieve both documents.

This may confuse users: "why does this document not turn up in my search results", and makes it hard to implement a security model using aliases.

The UidField.loadDocIdAndVersion() method already uses a filter to check whether the document has been deleted. It would be possible to pass in the alias filter, if defined.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions