Skip to content

List documents in collection returns documents containing only the requested collectionId #2257

@LeoHelfferich

Description

@LeoHelfferich

Describe the bug
When requesting documents by collectionId, the documents always contain only one collection ID - from the collection we requested it for. It does not represent the true data state. When fetching the document with other endpoints, the correct data is inside collectionIds field is returned.

To Reproduce
Steps to reproduce the behavior:

  1. Create n>=2 collections
  2. Create a document and add it to all n collections
  3. Fetch document by id => field collectionIds contains n IDs (positive confirmation)
  4. List documents in collection C (C = random collection ID) => field collectionIds in document object contains only C

Expected behavior
Fetched/returned documents data should be identical across API requests, as long as the data itself does not change.
Documents returned by https://api.sciphi.ai/v3/collections/:id/documents endpoint return documents which contain only the collectionId provided as argument, but should contain all collectionIds they are connected to.

Screenshots

Image vs Image

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