Skip to content

Conversation

@jrhoads
Copy link
Member

@jrhoads jrhoads commented Jan 15, 2026

Purpose

The purpose of this PR is to decommission support for ROR Schema v1 during the indexing and data setup processes. This ensures that all future data updates and index creations strictly use the Schema v2 format, while maintaining backward compatibility for queries against existing v1 indices where necessary.

Approach

The approach involves removing logic branches that handled v1 indexing in management commands and views. The system now defaults to Schema v2 for all indexing operations.

Key Modifications

  • Views: Modified IndexDataDump to always use schema = 2 regardless of the version passed in the request.
  • Management Commands:
    • createindex.py: Removed logic to create v1 indices; it now exclusively creates v2 indices.
    • deleteindex.py: Focused deletion logic on v2 indices.
    • indexror.py: Removed v1-specific field mapping functions (get_nested_names_v1, get_nested_ids_v1) and enforced a check that only v2 is supported.
    • indexrordump.py: Updated logic to detect v2.0+ filenames (e.g., v2.x.json) and removed the ability to index v1 JSON files.
    • setup.py: Restricted the --schema argument choice to 2 and updated success messages.
  • Settings: Retained the INDEX_V1 variable name for backward compatibility in API queries, but removed the associated v1 index template path to prevent accidental v1 index creation.

Important Technical Details

  • Filename Detection: In indexrordump.py, a regex was added to support both the legacy schema_v2 naming convention and the newer v{major}.{minor} semantic versioning filenames for data dumps.
  • Backward Compatibility: While indexing of v1 is removed, the organizations (v1) index name is still referenced in settings to ensure existing read-only v1 API endpoints continue to function against the last indexed v1 data.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change) - Breaking for indexing workflows

jpbarrett13 and others added 13 commits October 1, 2025 11:39
Merging staging for single search
- Updated `createindex.py` and `deleteindex.py` to remove v1 support and clarify command help messages.
- Simplified `indexror.py` and `indexrordump.py` to exclusively handle v2 schema, removing legacy v1 code.
- Adjusted `setup.py` to enforce v2 schema indexing only.
- Added comments for clarity on version handling in the code.
- Removed conditional schema assignment based on version, ensuring consistent use of v2 schema.
- Added a comment to clarify the removal of v1 indexing support.
@jrhoads jrhoads merged commit eb1392d into dev Jan 15, 2026
2 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.

3 participants