[SRCH-6455] - remove i14y code#2045
Conversation
Extract shared search methods from I14ySearch into DocumentSearchable concern, rename I14yPostProcessor to DocumentSearchPostProcessor, rename I14yFormattedQuery to DomainScopedQuery. This prepares for the full removal of i14y code (SRCH-6455).
Remove all i14y-only models, controllers, views, helpers, observer, engine, libs, and Cucumber step definitions (SRCH-6455).
Update all files that referenced i14y code: controllers (searches, API v2, admin affiliates, displays), models (affiliate, site_cloner, searchgov_url, searchgov_domain), views (nav, display settings, admin home, content), helpers (6 files), config (routes, constants, observers, faraday, env cache durations), JavaScript (constants, SpellingSuggestion), and .env files. Rename i14y SERP template to document (SRCH-6455).
Drop i14y_memberships and i14y_drawers tables, remove gets_i14y_results and i14y_date_stamp_enabled columns from affiliates (SRCH-6455).
Delete 17 spec files, 5 fixture files, 3 VCR cassettes, and update 25+ spec files to remove i14y references. Update Cucumber features (remove i14y scenarios, update SearchGov→SearchElastic), update JS tests, clean up .rubocop_todo.yml, .simplecov, seeds, and README (SRCH-6455).
Update show_search_filter_settings_authorized? to use !bing_v7_engine? since search_gov_engine? is no longer valid. Migrate existing SearchGov affiliates to SearchElastic. Update data_generator README (SRCH-6455).
The moduleCode lookup builds the key as `web${vertical}` (capitalized),
so vertical='document' needs key 'webDocument', not 'webSRCH'.
Remove i14y_drawers and i14y_memberships tables, gets_i14y_results and i14y_date_stamp_enabled columns from schema. Bump version to match migration timestamp so CI doesn't report pending migration.
Replace search_engine: SearchGov with SearchElastic in three affiliate fixtures (searchgov_affiliate, blended_affiliate, usagov_affiliate_header_bg_color) and update react_helper_spec.
YaritzaGarcia
left a comment
There was a problem hiding this comment.
Noticed that there are two tests failing:
Failed examples:
rspec ./spec/system/click_tracking_spec.rb:26 # A user searches a searchgov site for a best bet the search results have the expected data attributes
rspec ./spec/system/click_tracking_spec.rb:36 # A user searches a searchgov site for a best bet the user clicks a search result js sends in a click event, creating the expected log line.
The /search/i14y API endpoint is used by external customers and api.gsa.gov routing. Keep the route and action but backed by SearchElastic/OpenSearch engines instead of the retired i14y service. Rename Api::I14ySearchOptions to Api::DocumentSearchOptions.
|
Thanks for catching those @YaritzaGarcia. The |
The second tuple element in pick_klass_vertical_template is the vertical name used in data-vertical HTML attributes and click tracking. Use :document (matching the template name) instead of :SRCH (which is the module tag).
Per team review, old SearchGov affiliates should migrate to open_search (not search_elastic). Update migration, fixtures, Cucumber features, and specs accordingly.
The CI test environment creates a SearchElastic index but not an OpenSearch search index, so fixtures using OpenSearch cause index_not_found errors in system specs. Use SearchElastic for test fixtures while the migration still targets open_search for production.
The original condition included gets_i14y_results and search_gov_engine?, which were removed. Simplify to !bing_v7_engine? since all non-Bing engines should show the results format options.
selfdanielj
left a comment
There was a problem hiding this comment.
I reviewed the code and ran locally, trying out searches both web and API and poking around in the admin center. Looks good to me!
Summary
Remove all i14y code from the codebase per SRCH-6455. The i14y integration is retired — all document search now goes through SearchElastic/OpenSearch engines directly.
Key changes:
I14ySearchinto aDocumentSearchableconcern, reparentBlendedSearchandSearchElasticEngineto inherit fromFilterableSearchi14y_drawers/i14y_membershipstables, removegets_i14y_results/i14y_date_stamp_enabledcolumnsSearchGovfromSEARCH_ENGINESconstant120 files changed, ~5,100 lines removed.
Checklist
Functionality Checks
main) into your branch.Process Checks
How to test
Verify no i14y references remain:
Should return nothing (VCR cassettes with base64 noise are expected false positives).
Verify routes are clean:
Should return nothing.
Run the migration:
Confirm
i14y_drawersandi14y_membershipstables are dropped, and anysearch_govaffiliates are migrated tosearch_elastic.Run specs:
bundle exec rspecRun Cucumber features:
bundle exec cucumberSmoke test search engines: Verify that
BlendedSearch,SearchElasticEngine,OpenSearch::Engine, andLegacyOpenSearch::Enginestill return results for an affiliate using each engine type.Resolves SRCH-6455