[FIX] website: remove forced name ordering in autocomplete for search#629
Open
IrvingReyes wants to merge 1 commit intoVauxoo:16.0-ircfrom
Open
Conversation
…_type 'all' Prior to this patch, the autocomplete method on the /website/snippet/autocomplete route explicitly forced results to be ordered by name when the search_type was set to 'all'. This behavior could override custom ordering logic introduced in each model's _search_fetch method (e.g., for pages, events, blogs). This patch removes the forced ordering by name for search_type 'all', allowing the ordering to respect the logic defined in each model's _search_fetch implementation. This ensures consistency and predictability when presenting autocomplete results, especially when custom or domain-specific sorting is required. No changes were made to the default behavior for other search types. Related to previous improvements in _search_fetch for website.page, event.event, and website.blog. PATCH USE to 16.0
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.
Description of the issue/feature this PR addresses:
Ensures consistency and predictability when presenting autocomplete results, especially when custom or domain-specific sorting is required.
Current behavior before PR:
Prior to this patch, the autocomplete method on the /website/snippet/autocomplete route explicitly forced results to be ordered by name when the search_type was set to 'all'. This behavior could override custom ordering logic introduced in each model's _search_fetch method (e.g., for pages, events, blogs).
Desired behavior after PR is merged:
This patch removes the forced ordering by name for search_type 'all', allowing the ordering to respect the logic defined in each model's _search_fetch implementation. This ensures consistency and predictability when presenting autocomplete results, especially when custom or domain-specific sorting is required.
No changes were made to the default behavior for other search types.
Related to previous improvements in _search_fetch for website.page, event.event, and website.blog.
PATCH USE to 16.0