Skip to content

impl index spec#2103

Merged
shivamka1 merged 44 commits intomasterfrom
features/index_spec
Jun 6, 2025
Merged

impl index spec#2103
shivamka1 merged 44 commits intomasterfrom
features/index_spec

Conversation

@shivamka1
Copy link
Collaborator

@shivamka1 shivamka1 commented May 22, 2025

This PR implements IndexSpec that can be used to create index for properties selectively: #1985

 let graph = init_graph(Graph::new());

let index_spec = IndexSpecBuilder::new(graph.clone())
    .with_const_node_props(vec!["x"])?
    .with_all_temp_node_props()
    .with_all_edge_props()
    .build();

graph.create_index_in_ram_with_spec(index_spec).unwrap();

On python this looks like:

graph = init_graph(Graph())
spec = (
    IndexSpecBuilder(graph)
    .with_const_node_props(["y"])
    .with_temp_node_props(["p1"])
    .with_const_edge_props(["e_y"])
    .with_temp_edge_props(["e_p1"])
    .build()
)

graph.create_index_in_ram_with_spec(spec)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 425556f Previous: b1a22cf Ratio
lotr_graph_window_100/iterate nodes 7238 ns/iter (± 449) 3110 ns/iter (± 46) 2.33

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Collaborator

@ljeub-pometry ljeub-pometry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix race condition in index creation

Copy link
Collaborator

@ljeub-pometry ljeub-pometry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor things to tidy up but looking good otherwise

@shivamka1 shivamka1 marked this pull request as ready for review June 5, 2025 15:12
@shivamka1 shivamka1 merged commit 48a104d into master Jun 6, 2025
28 of 29 checks passed
@shivamka1 shivamka1 deleted the features/index_spec branch June 6, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants