Repository navigation
fix: resolve Algolia search adapter design gaps (keyword/country filtering, index settings as code, non-numeric id handling) / Algolia検索Adapterの設計課題を解消(キーワード/国名フィルタ、インデックス設定のコード化、非数値ID対応) - #608
Merged
Conversation
…geSearchAdapterTest (#579)
…lter fix: keep keyword search intact when countryIso3 resolves / countryIso3解決時にkeywordを破棄しない
The countryName branch (reached only when countryIso3 did not resolve) added its OR-filter to the mandatory $filters array, so an input that doesn't match a real country (e.g. "Jap") excluded every record instead of falling back to full-text search, even though the surrounding comment said the opposite was intended. Move it to $optionalFilters, which boosts matching records instead of excluding non-matching ones, and extend the empty-result guardrail to also treat a non-empty $optionalFilters as real search criteria.
…ageSearchAdapterTest - country-name-only search now expects optionalFilters, not filters - lowercase country name still builds the optional OR-filter - an unresolvable country term (e.g. a 3-letter non-country word) no longer short-circuits to an empty result via the adapter's own guardrail
…nal-filter fix: use optionalFilters for unresolved countryName in Algolia search / 未解決countryNameをoptionalFiltersに変更
…appy-path branches
feat: manage Algolia attributesForFaceting as code / Algoliaのattributesforfacetingをコードで管理
…dling fix: do not silently drop non-numeric Algolia hit ids / 非数値IDのサイレントドロップを防ぐ
1 of 10 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #608 +/- ##
============================================
+ Coverage 67.35% 68.19% +0.84%
- Complexity 1708 1733 +25
============================================
Files 149 153 +4
Lines 8965 9202 +237
============================================
+ Hits 6038 6275 +237
Misses 2927 2927
🚀 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 / 目的
A design-gap audit of
AlgoliaWorldHeritageSearchAdaptersurfaced several real correctness and maintainability issues (tracked under parent Issue #592). This PR brings together the fixes landed on thefix/algolia-search-adapter-design-gapsbranch so far.AlgoliaWorldHeritageSearchAdapterの設計レビュー(親Issue #592)で、いくつかの実際の正確性・保守性の問題が見つかりました。What I have done / 実施内容
countryNamefrom the mandatoryfilterstooptionalFilters, so an unrecognized country name no longer forces a zero-result response (Change countryName branch filter from filters to optionalFilters #595)attributesForFacetingindex settings as code via a newalgolia:sync-index-settingscommand, instead of only in the dashboard (Confirm filterable attributes are declared in attributesForFaceting with filterOnly #598)array_filter(Do not silently drop non-numeric IDs during ID extraction #600)