Skip to content

feat(search-v2): implement function-level chunking with tree-sitter#138

Merged
DevanshuNEU merged 1 commit into
OpenCodeIntel:mainfrom
DevanshuNEU:feat/function-level-chunking
Jan 4, 2026
Merged

feat(search-v2): implement function-level chunking with tree-sitter#138
DevanshuNEU merged 1 commit into
OpenCodeIntel:mainfrom
DevanshuNEU:feat/function-level-chunking

Conversation

@DevanshuNEU

@DevanshuNEU DevanshuNEU commented Jan 4, 2026

Copy link
Copy Markdown
Collaborator

Issue #68: Function-level Chunking

Summary

This PR implements the foundation for Search V2 by adding function-level code extraction using tree-sitter AST parsing.

Changes

  • backend/services/search_v2/types.py - Data models (ExtractedFunction, SearchResult, Language)
  • backend/services/search_v2/tree_sitter_extractor.py - AST-based function extraction for Python/JS/TS
  • backend/services/search_v2/function_filter.py - Quality filtering to remove test/junk functions
  • backend/services/search_v2/__init__.py - Module exports
  • backend/services/indexer_optimized.py - Added index_repository_v2() method
  • backend/tests/test_search_v2_chunking.py - 15 tests (all passing)

Key Features

Feature Description
Qualified Names Class.method format for disambiguation
Docstring Extraction Captures docstrings for better search context
Async Detection Identifies async functions
Decorator Extraction Captures decorator metadata
Quality Filtering Removes test_*, mock_*, benchmark functions

Test Results

tests/test_search_v2_chunking.py ... 15 passed ✅

Part of Search V2 Epic

This is PR 1 of 4:

Reviewers

@vercel

vercel Bot commented Jan 4, 2026

Copy link
Copy Markdown

@DevanshuNEU is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

Closes OpenCodeIntel#68

Add function-level code extraction using tree-sitter AST parsing:

- TreeSitterExtractor for Python/JS/TS function extraction
- FunctionFilter to remove test/junk functions
- ExtractedFunction and SearchResult data models
- index_repository_v2() method in indexer
- 15 tests passing

Part 1 of 4 in Search V2 epic.
@DevanshuNEU DevanshuNEU force-pushed the feat/function-level-chunking branch from 33355da to 1900061 Compare January 4, 2026 21:22
@vercel

vercel Bot commented Jan 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
opencodeintel Ignored Ignored Preview Jan 4, 2026 9:25pm

@DevanshuNEU DevanshuNEU merged commit 25569af into OpenCodeIntel:main Jan 4, 2026
6 checks passed
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.

1 participant