MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / apply_index_rules

Method apply_index_rules

graphlite/src/plan/optimizer.rs:506–519  ·  view source on GitHub ↗

Apply index-aware optimization rules to logical plan

(&mut self, plan: LogicalPlan)

Source from the content-addressed store, hash-verified

504
505 /// Apply index-aware optimization rules to logical plan
506 fn apply_index_rules(&mut self, plan: LogicalPlan) -> Result<LogicalPlan, PlanningError> {
507 let mut optimized = plan;
508
509 // Convert text matches to full-text search
510 optimized = self.transform_text_search(optimized)?;
511
512 // Convert graph patterns to graph index operations
513 optimized = self.transform_graph_operations(optimized)?;
514
515 // Convert selective filters to index scans
516 optimized = self.transform_selective_filters(optimized)?;
517
518 Ok(optimized)
519 }
520
521 /// Transform text search patterns to full-text search
522 fn transform_text_search(&self, plan: LogicalPlan) -> Result<LogicalPlan, PlanningError> {

Callers 2

optimize_with_indexesMethod · 0.80
plan_queryMethod · 0.80

Tested by

no test coverage detected