[wp-trac] [WordPress Trac] #39761: Buggy sort of search results
WordPress Trac
noreply at wordpress.org
Wed Feb 1 19:59:13 UTC 2017
#39761: Buggy sort of search results
--------------------------+------------------------------
Reporter: Gargo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 4.7.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Changes (by SergeyBiryukov):
* component: Date/Time => Query
Comment:
Hi @Gargo, welcome to Trac! Thanks for the report.
Search results are actually ordered by relevance. The ordering logic is as
follows:
* Full sentence matches in post titles.
* All search terms in post titles.
* Any search terms in post titles.
* Full sentence matches in post content.
Each section and any remaining posts are then sorted by date.
There also some filters for advanced customization:
* `wp_search_stopwords`, to filter stop words ignored in `WHERE`.
* `posts_search_orderby`, to filter the `ORDER BY` when ordering search
results.
See [25632] and the discussion in #7394.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39761#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list