Skip to content

Support for filtering empty and not empty relations #44

Description

@ErisDS

Problem

In Ghost we want to be able to filter posts that have tags, or do not have tags.

Solution

IMO the syntax should be filter=tags:null or filter=tags:-null.

This doesn't cause an error, but it also doesn't do what you'd expect.

filter=tags:null - should return all posts with no tags
filter=tags:-null - should return all posts with at least one tag

Alternatively it could perhaps be done by supporting filtering on counts e.g.

filter=count.tags:0
filter=count.tags:>0

But this I think is a lot less intuitive.

Activity

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

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions