Decommission ROR Schema v1 indexing support#512
Merged
Conversation
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
added a commit
that referenced
this pull request
Jan 16, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
IndexDataDumpto always useschema = 2regardless of the version passed in the request.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--schemaargument choice to2and updated success messages.INDEX_V1variable name for backward compatibility in API queries, but removed the associated v1 index template path to prevent accidental v1 index creation.Important Technical Details
indexrordump.py, a regex was added to support both the legacyschema_v2naming convention and the newerv{major}.{minor}semantic versioning filenames for data dumps.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