Pometry / Pometry/Raphtory

Can we add support for maps for both filter and search for both properties and metadata

Open
#2,257 0 comments 0 reactions 1 assignee View on GitHub

@shivamka1 is already working on this.

Since Sep 5, 2025.

Dominant language
Rust
Stars
642
Forks
70
Avg merge
2d 13h
Merged PRs (30d)
21

Description

Properties

p1 -> {"fire_nation": 1, "water_tribe": 2} is a map

filter.Node.property("p1") == {"fire_nation": 1, "water_tribe": 2} (Q)
filter.Node.property("p1").contains("fire_nation"), not_contains
filter.Node.property("p1").get("fire_nation") == 1
filter.Node.property("p1").values().sum() > 3, other agg filters

// latest property
filter.Edge.layer("fire_nation").property("p1").is_some()

Metadata

If there is only a single layer, metadata is a single value otherwise it is a map:
filter.Edge.metadata("p1") == {"fire_nation": 1, "water_tribe": 2}
filter.Edge.metadata("p1").contains("fire_nation") (A'), not_contains
filter.Edge.layer("fire_nation").metadata("p1").is_some() (B')
filter.Edge.layer("fire_nation").metadata("p1") == 1 (A)
filter.Edge.metadata("p1").get("fire_nation") == 1 (B)
filter.Edge.metadata("p1").values().sum() > 3, other agg filters

Notes:

  1. A and B, A' and B' are equivalent semantically
  2. .layer is not supported for node
  3. Node metdata is always a single value as of now!
  4. Q is the only thing supported as of now but not for metadata

  • Search needs to support map, layers: test_search_edges_for_metadata_eq
    metadata is now a map of layers to value. for instance: p1 -> {"water_tribe" -> 1, "fire_nation" -> 2}. So in order to be able to search for a metadata we need to either:
    1. Get a layered graph like so: graph.layer("fire_nation") and a filter: filter.Edge.metadata("p1") == 1
    2. Support filter: filter.Edge.metadata("p1") == {"fire_nation": 1} [supported in raphtory, not in search apis as of yet], filter.Edge.metadata("p1").all() == 1, filter.Edge.metadata("p1").any() == 1. Here filter.Edge.metadata("p1") is essentially a map, so qualifiers like all, any should also be supported for a map.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.