Support indexing of properties in embedded documents inside lists with BY ITEM by Copilot · Pull Request #2803 · ArcadeData/arcadedb (original) (raw)
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
- Add support for dot notation in property names using backticks
- Update TypeIndexBuilder to validate nested property paths
- Implement nested property extraction in DocumentIndexer for BY ITEM indexes
- Handle nested properties in index creation, update, and deletion
- Add test cases for embedded list indexing
Note: Query optimizer integration pending - queries work but don't yet use the index
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
- Update TypeIndexBuilder to check for exact property name before treating as nested path
- Update DocumentIndexer getPropertyValue to check record.has() before treating as nested
- Improve nested path resolution to be more robust
- All existing index tests now pass
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
Copilot AI changed the title[WIP] Add support for indexing properties in embedded documents Support indexing of properties in embedded documents inside lists with BY ITEM
… nested properties
- Modified ContainsCondition.isIndexAware() to handle nested property paths
- Support both simple identifiers (tags) and nested paths (tags.id)
- Queries like "tags.id CONTAINS 100" now use the index instead of table scans
- All existing index tests pass (98/98)
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
- Test for "SELECT FROM Photo WHERE tags.id CONTAINS 103" with index verification
- Test for "SELECT FROM Photo WHERE tags CONTAINS (id=100 and name='Apple Inc')"
- Both queries work correctly and use indexes where applicable
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
…h index usage
- Document that
tags CONTAINS (id=100 and name='Apple Inc')doesn't use index - Show alternative:
tags.id CONTAINS 100 AND tags.name CONTAINS 'Apple Inc' - Alternative syntax uses index on tags.id and filters by name
- Added CompoundConditionIndexTest to demonstrate index usage
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
lvca marked this pull request as ready for review
lvca approved these changes Nov 17, 2025
robfrank pushed a commit that referenced this pull request
…h BY ITEM (#2803)
Initial plan
Initial test case for embedded list indexing issue
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
- Implement nested property indexing for lists with BY ITEM modifier
- Add support for dot notation in property names using backticks
- Update TypeIndexBuilder to validate nested property paths
- Implement nested property extraction in DocumentIndexer for BY ITEM indexes
- Handle nested properties in index creation, update, and deletion
- Add test cases for embedded list indexing
Note: Query optimizer integration pending - queries work but don't yet use the index
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
- Fix property name handling for properties with dots in their names
- Update TypeIndexBuilder to check for exact property name before treating as nested path
- Update DocumentIndexer getPropertyValue to check record.has() before treating as nested
- Improve nested path resolution to be more robust
- All existing index tests now pass
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
- Enable query optimizer to use BY ITEM indexes for CONTAINS queries on nested properties
- Modified ContainsCondition.isIndexAware() to handle nested property paths
- Support both simple identifiers (tags) and nested paths (tags.id)
- Queries like "tags.id CONTAINS 100" now use the index instead of table scans
- All existing index tests pass (98/98)
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
- Add test cases for specific queries mentioned in review comments
- Test for "SELECT FROM Photo WHERE tags.id CONTAINS 103" with index verification
- Test for "SELECT FROM Photo WHERE tags CONTAINS (id=100 and name='Apple Inc')"
- Both queries work correctly and use indexes where applicable
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
- Add test demonstrating alternative syntax for compound conditions with index usage
- Document that
tags CONTAINS (id=100 and name='Apple Inc')doesn't use index - Show alternative:
tags.id CONTAINS 100 AND tags.name CONTAINS 'Apple Inc' - Alternative syntax uses index on tags.id and filters by name
- Added CompoundConditionIndexTest to demonstrate index usage
Co-authored-by: lvca 312606+lvca@users.noreply.github.com
- Fix formatting
Co-authored-by: copilot-swe-agent[bot] 198982749+Copilot@users.noreply.github.com Co-authored-by: lvca 312606+lvca@users.noreply.github.com Co-authored-by: lvca lvca@users.noreply.github.com (cherry picked from commit 39342cb)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})