Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

"not" operator in Query

default discord avatar
khakimvinh2 years ago
3

Hi all, is there any way to use "not" for the "contains" in Query? I have a text field and would like to query list of items with that field not containing certain words. Thanks

  • default discord avatar
    jessrynkar2 years ago

    Hi

    @541919862608363530

    we don't currently have an operator that could represent

    not contains

    but it could definitely be built - if you're up for making a PR, we would happily accept it! See related github discussion

    https://github.com/payloadcms/payload/discussions/1294
  • default discord avatar
    khakimvinh2 years ago

    Hi

    @854377910689202256

    , thanks for replying. I will try to see what I can do. Any hints or guide where I can look into adding this feature?

  • discord user avatar
    jmikrut
    2 years ago
    https://github.com/payloadcms/payload/pull/1776

    this is something similar, we need to merge this

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.