#Is it not possible to filter by a M2M field on a collection?

23 messages · Page 1 of 1 (latest)

north iglooBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please make sure your question includes the following:

  • An explanation of exactly what you're trying to achieve.
  • Any and all related code or previous attempts.
  • The exact issue or error you are facing.
  • Any screenshots if applicable.

When you're done with this thread, please close it.

(If you have a support agreement and need help, please contact the core team via email.)

open narwhal
#

Is there a way to bump this for my sanity

sleek rune
#

What version are you on?

open narwhal
#

Hello! Thank you for the response i am on 9.23.1

#

Another example, since I deleted.

#

I've used Directus for a couple of years, and i could have sworn filtering did work on m2m relationships

#

Seems to work fine for searching just one term, but it does not work for multiple terms

sleek rune
#

What type of field is 'slug'? It looks like checkbox. I think the issue is searching checkbox fields.

#

not related to the M2M. you can search the "genres" collection directly to test

open narwhal
#

The slug feild is just a string value that exists on the Genre collection, its a slugified title basically.

#

So it should be searchable 🙂

#

I must be missing something

sleek rune
#

so you're manually typing "retro,future-base,soul"?

#

Can you open up the "Genres" collections and test a search from there. It would be good to workout if this is related to the M2M or not

open narwhal
#

Yeah it works fine when filtering the genre collection

sleek rune
#

looks like this issue is actually just related to the "doesn't contain" option

open narwhal
#

Is this also a bug? There should be at least one result since one item contains both soul and retro

#

Doesnt seem like there is a good way to return results for items that only include for example "soul" and "retro"

sleek rune