fix: remove dead Algolia filter and restrict search response payload / Algolia検索の無駄なフィルタ・レスポンス削減 - #577
Open
zigzagdev wants to merge 2 commits into
Open
fix: remove dead Algolia filter and restrict search response payload / Algolia検索の無駄なフィルタ・レスポンス削減#577zigzagdev wants to merge 2 commits into
zigzagdev wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #577 +/- ##
============================================
+ Coverage 64.66% 64.99% +0.33%
- Complexity 1694 1695 +1
============================================
Files 147 147
Lines 8858 8894 +36
============================================
+ Hits 5728 5781 +53
+ Misses 3130 3113 -17
🚀 New features to boost your workflow:
|
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.
Motivation / 目的
An investigation into the search implementation found two low-risk, no-behavior-change cleanups in
AlgoliaWorldHeritageSearchAdapter. Both were verified directly against the live (dev) Algolia index before fixing.検索実装の調査で、
AlgoliaWorldHeritageSearchAdapterに挙動を変えない低リスクな無駄を2件見つけました。修正前に実際のAlgoliaインデックス(dev用)に対してクエリを投げて事実確認しています。What I have done / 実施内容
state_party:"..."clause frombuildCountryOrFilter().state_partyis never indexed (confirmed:AlgoliaImportWorldHeritagesnever pushes such a field), and querying it directly against the live index returns 0 hits with no error — it's dead weight sent on every country-name search.attributesToRetrieve: ['objectID', 'id']to thesearchSingleIndexcall. Only the id is ever read from the response (WorldHeritageQueryService::searchHeritagesre-fetches the full record from MySQL viafindByIdsPreserveOrder), so the rest of each hit's fields were fetched from Algolia and immediately discarded.Test Results / テスト結果
Full
WorldHeritage-related suite (64 tests) also re-run with no regressions.