Commit 1ede40b
committed
refactor: migrate to unified add_index() API for python-arango 8.x compatibility
Replace deprecated add_*_index() methods with the unified add_index() API
introduced in python-arango 8.x to eliminate deprecation warnings and
future-proof the codebase.
Changes:
- Updated handle_create_index() in handlers.py to use col.add_index()
- Replaced 6 deprecated methods (add_persistent_index, add_hash_index,
add_skiplist_index, add_ttl_index, add_fulltext_index, add_geo_index)
- Build index_data dictionary with type-specific parameters
- Use formatter=True for backward compatibility with snake_case fields
Benefits:
- Eliminates DeprecationWarning for add_geo_index()
- Uses python-arango 8.x recommended API
- Cleaner, more maintainable code with single unified method
- Future-proof against removal of deprecated methods in 9.x
Testing:
- All existing unit tests pass (171 passed)
- Verified with live ArangoDB 3.11.14 - all index types work correctly
- No deprecation warnings in production usage
- Backward compatible - no breaking changes to MCP server API
Related to python-arango 8.2.2 upgrade (see DEPENDENCY_UPGRADE_ANALYSIS)1 parent c3595c6 commit 1ede40b
File tree
5 files changed
+257
-131
lines changed- mcp_arangodb_async
5 files changed
+257
-131
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| |||
0 commit comments