Page MenuHomePhabricator

Add chronological sorting by-page-creation-timestamp for search results
Closed, ResolvedPublic

Description

Feature request: Please add optional chronological sorting of search results, ordered by (reverse?) time of page-creation.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 433986 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Adjust available sort orders

https://gerrit.wikimedia.org/r/433986

Change 433989 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/core@master] Expose sort orders from search engine in ApiQuerySearch

https://gerrit.wikimedia.org/r/433989

Change 433986 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Adjust available sort orders

https://gerrit.wikimedia.org/r/433986

we need to do something to populate the index with the new creation date field, it can be done with a full reindex from mysql but we don't do those too regularly, they take about a week to process through all the wikis once started.

Change 433989 merged by jenkins-bot:
[mediawiki/core@master] Expose sort orders from search engine in ApiQuerySearch

https://gerrit.wikimedia.org/r/433989

Vvjjkkii renamed this task from Add chronological sorting by-page-creation-timestamp for search results to oocaaaaaaa.Jul 1 2018, 1:09 AM
Vvjjkkii removed EBernhardson as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: EBernhardson; removed: gerritbot, Aklapper.
CommunityTechBot renamed this task from oocaaaaaaa to Add chronological sorting by-page-creation-timestamp for search results.Jul 1 2018, 6:20 PM
CommunityTechBot assigned this task to EBernhardson.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot edited subscribers, added: gerritbot, Aklapper; removed: EBernhardson.

If sorting on creation timestamp is solved, could also an option for last touched be added? It would help tremendously when doing edits in multiple articles based on search results. It is requested in T40403.

@Ainali I think that it already supported, as part of the prior patches to this ticket. Some documentation still needs to be written, but the sort can be provided in the search api. The current sorts reported available (via Special:ApiSandbox) are:

  • relevance - the standard scoring algorithm
  • just_match - Only runs the retrieval phase of search, skipping a few advanced re-scoring steps (boosting by popularity/incoming links, and reranking the top few thousands docs with a machine learning algorithm). Probably only useful for debugging.
  • none - No sorting at all, order is whatever order it happens to be found in the index.
  • incoming_links_asc - Sort pages with least number of incoming wikilinks first
  • incoming_links_desc - Sort pages with largest number of incoming wikilinks first
  • last_edit_asc - Sort pages least recently edited first
  • last_edit_desc - Sort pages most recently edited first

This ticket is waiting/blocked on the last two sort orders:

  • create_date_asc - Sort pages least recently created first
  • create_date_desc Sort pages most recently created first

The sort is only exposed via api, We will need to convince someone more familiar with front end work to expose it for general usage. That might be a reasonable request for Advanced-Search. (Looks like T197525 ?)

Change 449917 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/core@master] Add Special:Search sort parameter without ui

https://gerrit.wikimedia.org/r/449917

Change 449917 merged by jenkins-bot:
[mediawiki/core@master] Add Special:Search sort parameter without ui

https://gerrit.wikimedia.org/r/449917

create_date_asc and create_date_desc will be populated by T203622, which will eventually unblock this task. That will likely be deployed after the DC switchover and will then need 8-10 weeks to iterate over the full document set and reindex everything. That basically means everything should be populated by mid-december or so.

Smalyshev triaged this task as Medium priority.Sep 12 2018, 5:26 AM

Change 484589 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Turn on sorting by page creation date

https://gerrit.wikimedia.org/r/484589

Change 484589 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Turn on sorting by page creation date

https://gerrit.wikimedia.org/r/484589