Bynt-1381: Mirror Search Optimizations on Actors and Incidents#127
Merged
Bynt-1381: Mirror Search Optimizations on Actors and Incidents#127
Conversation
- Migrate actor_query() and incident_query() to return (stmt, conditions) tuples - Optimize text search with individual ILIKE conditions for better index performance - Remove obsolete build_actor_query and build_incident_query methods - Update get_query() to handle unified query objects for all entity types - Preserve all original search functionality
- Migrate api_actors() from old (queries, ops) union/intersect to unified query objects - Fix api_incidents() bug with direct su.get_query() call - Implement dual query strategy: fast path vs count path - Add cursor-based pagination with id < cursor for performance - Include optional total count with include_count toggle - Minimal serialization for better performance - Consistent response format with bulletins: nextCursor, meta, totalType
- Remove GET /admin/api/actors endpoint, keep only POST with cursor pagination - Remove GET /admin/api/incidents endpoint, keep only POST with cursor pagination - Add CursorPaginationResponse schema for cursor-based pagination structure - Add ActorQueryRequest and IncidentQueryRequest schemas with cursor parameters - Update ActorsResponse and IncidentsResponse to use CursorPaginationResponse - Document nextCursor, meta (currentPageSize, hasMore, isFirstPage), total, totalType fields - Update descriptions to highlight cursor-based pagination benefits for large datasets
…test file, remove seed file from .gitignore
level09
approved these changes
Jul 9, 2025
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.
Jira Issue
Description
Implements comprehensive migration for Actors and Incidents, covering SearchUtils refactoring from (queries, ops) tuple to unified query objects, cursor-based pagination with dual query strategy, complete database index audit (all 50 indexes introduced in branch
search-v4migrations are also defined on ORM-level), and minimal serialization patternsChecklist
API Changes (if applicable)
Additional Notes
[Any other relevant information]