Skip to content

AND Filters #1291

@dskvr

Description

@dskvr

There have been a number of discussions about this topic, and it's even been implemented in a PR to nostr-rs-relay. I published a gist 3 months ago with the hopes someone would pick up where I left off, but nobody has.

tldr

filters: {
  "kinds": [1],
  "&t": ["meme", "cat"],
  "#t": ["black", "white"]
}
// returns kind `1` events with `t` tags that have both "meme" and "cat" that have the tag "black" or "white"

Resources

Rationale

  1. Makes filters more powerful/intuitive
  2. Optimizes bandwidth
  3. Potentially optimizes relays
  4. Potentially optimizes client development

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions