Opened 8 years ago
Closed 6 years ago
#39761 closed defect (bug) (duplicate)
Buggy sort of search results
Reported by: | Gargo | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
Example:
http://gargo.of.by/?s=map
In my opinion the search results should be sorted by date (preferred for me) or by relevancy. But it seems wordpress takes the search results and mixes them unpredictably
Change History (4)
#2
follow-up:
↓ 3
@
8 years ago
It looks like you have Search Everything, Search in Place, and perhaps some other plugins installed, which might affect search results.
If you'd like to report an issue with WordPress core, please check if it still happens with all plugins disabled and a default theme (Twenty Seventeen or Twenty Sixteen) activated.
If you'd like to report an issue with a plugin, please use the plugin support forum for that.
#3
in reply to:
↑ 2
@
8 years ago
Replying to SergeyBiryukov:
It looks like you have Search Everything, Search in Place, and perhaps some other plugins installed, which might affect search results.
If you'd like to report an issue with WordPress core, please check if it still happens with all plugins disabled and a default theme (Twenty Seventeen or Twenty Sixteen) activated.
If you'd like to report an issue with a plugin, please use the plugin support forum for that.
Thanks for fast answer but all the installed plugins doesn't have influence on this behaviour - I installed them later and hoped to fix the sort order with them
Hi @Gargo, welcome to Trac! Thanks for the report.
Search results are actually ordered by relevance. The ordering logic is as follows:
Each section and any remaining posts are then sorted by date.
There are also some filters for advanced customization:
wp_search_stopwords
, to filter stop words ignored inWHERE
.posts_search_orderby
, to filter theORDER BY
when ordering search results.See [25632] and the discussion in #7394.