Imagine you have a "movie" content type that has a multi-value entity reference field for the "actor" content type.

Let's say you have movies with Keanu Reeves. Let's say you have movies with Sandra Bullock. Let's also say you have a movie that has both Keanu and Sandra.

Using JSON:API, I can get a list of all movies that have Keanu:

/jsonapi/node/movie?include=field_actors,field_genre,field_poster&filter[actor][condition][path]=field_actors.title&filter[actor][condition][value]=Keanu Reeves

I can get a list of all movies that have Sandra:

/jsonapi/node/movie?include=field_actors,field_genre,field_poster&filter[actor][condition][path]=field_actors.title&filter[actor][condition][value]=Sandra Bullock

I can get a list of all movies that have either Keanu or Sandra:

/jsonapi/node/movie?include=field_actors,field_genre,field_poster&filter[actor][condition][path]=field_actors.title&filter[actor][condition][value][]=Keanu Reeves&filter[actor][condition][value][]=Sandra Bullock&filter[actor][condition][operator]=IN

But what I really want is to get a list of movies where both Keanu AND Sandra are in the movie. I can't seem to get the filter right - any ideas?

Comments

ebeyrent created an issue. See original summary.

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +API-First Initiative
wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Related issues: +#3066202: Filtering multivalue reference fields to contain multiple specified values does not work

Please ignore #2, this seems to be broken: #3066202: Filtering multivalue reference fields to contain multiple specified values does not work :( Please follow that issue!