Skip to content

[FIX] website: remove forced name ordering in autocomplete for search#629

Open
IrvingReyes wants to merge 1 commit intoVauxoo:16.0-ircfrom
vauxoo-dev:16.0-remove-forced-name-ordering-in-autocomplete-irvingreyes
Open

[FIX] website: remove forced name ordering in autocomplete for search#629
IrvingReyes wants to merge 1 commit intoVauxoo:16.0-ircfrom
vauxoo-dev:16.0-remove-forced-name-ordering-in-autocomplete-irvingreyes

Conversation

@IrvingReyes
Copy link

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

…_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
@IrvingReyes IrvingReyes changed the base branch from 17.0 to 16.0-irc June 17, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant