Skip to content

Is it possible to filter based on array values? #826

Closed

Description

@ardevd

I can't seem to figure out whether it's possible to filter on array values. Say you have a document with a numerical array field and you want to filter based on that to give you records that contain the supplied filter value in the array.

I dont think the comparison operators (=, !=, >, <, <=, >=) work in this case. If your numeric array for a given record contains [1,5,10,12] and you want to filter based on the value 5 then the comparison operators do not make sense. filters[my_array=5] doesnt work and returns an empty result set. Seems like you need the equivalent of an IN keyword.

Please advise.

Activity

  1. added
    bug
    on Jan 14, 2021
  2. ardevd commented on Feb 22, 2021

    @ardevd
    Author

    Any update on this? I realize arrays are broken in multiple ways currently, but is there any way to filter based on array values yet?

  3. eldadfux commented on Feb 24, 2021

    @eldadfux
    Member

    @ardevd we're working on fixing that, I'll share updates here and on Discord 👍🏻

  4. TorstenDittmann commented on Jun 25, 2021

    @TorstenDittmann
    Contributor

    Closing this in favor of #1174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions