Backlinks list order

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Backlinks list order

Max Vlasov
The docs say backlinks are sorted by titles (https://www.mediawiki.org/wiki/API:Backlinks .... "Ordered by linking page title"). I noticed that this is partially true. So while most of them look like sorted alphabetically, usually there are sections at the end of the list when there are plenty items that are not. So they look like they added later not obeying the sorting rule. The example is the article https://en.wikipedia.org/wiki/Teleology where the first page of "What links here" ( non-redirect articles) contains non-ordered items.  Is this expected?

But apart from figuring out whether there's a bug or not, another thought is that the alphabetical sort (if it works) is controversial since in any form of presentation, A-items are prime visible entities, while Z-items tend to be obscured if the list is long. So is it possible to implement other kind of sort, for example, something like PageRank for backlinks, so the links are sorted by the number of links coming to them? Sure There is a technical side (whether the structure  of the database will allow this) and probably legal (I hope Larry Page won't mind and won't sue WikiMedia for this)

I consider backlinks important because they tend to have  "see also" and "category" flavor in them, so just by looking at a partial list, I acquire additional knowledge and expectancy.

Thanks,

Max

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backlinks list order

Brad Jorsch (Anomie)
On Fri, Jun 2, 2017 at 11:25 AM, Max Vlasov <[hidden email]> wrote:
The docs say backlinks are sorted by titles (https://www.mediawiki.org/wiki/API:Backlinks .... "Ordered by linking page title").

That's not correct. Fixed the doc.

They're actually ordered by linking pageid if you don't specify multiple values for blnamespace, or by namespace then pageid if you do.

It may be better to use prop=linkshere rather than list=backlinks. That module is much less complicated and hacky.
 
So is it possible to implement other kind of sort, for example, something like PageRank for backlinks, so the links are sorted by the number of links coming to them?

No. The database structure doesn't allow efficient querying with any ordering other than the ordering used here. Number of incoming links in particular would be extremely slow, or with some rather significant changes to the code and database it might be able to be improved to merely being very slow.

BTW, Google's "PageRank" is, as far as I know, more complicated than just "number of incoming links".


--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backlinks list order

Max Vlasov


On Fri, Jun 2, 2017 at 8:24 PM, Brad Jorsch (Anomie) <[hidden email]> wrote:
They're actually ordered by linking pageid if you don't specify multiple values for blnamespace, or by namespace then pageid if you do.

It may be better to use prop=linkshere rather than list=backlinks. That module is much less complicated and hacky.
 


Brad, thanks for clarification.
Are there any other reason to use linkshere instead of backlinks? I mean it's not so rare to have more confidence in a recent (re)implementation of some feature (as a developer I'm also no exception). For example, it might be that if some novelty is on the agenda, it is more likely it will be implemented exclusively in linkshere module since it's more recent and stable rather than in both. 


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backlinks list order

Martin Domdey
In reply to this post by Max Vlasov
Hi!

Do we get data from different wikibase table columns using API linkshere or using API backlinks?

Why is the one "less complicated and hacky" than the other?

Greetings,
Martin ...



--
Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.
Am 03.06.2017, 09:24, Max Vlasov <max.vlasov@gmail.com> schrieb:


On Fri, Jun 2, 2017 at 8:24 PM, Brad Jorsch (Anomie) <[hidden email]> wrote:
They're actually ordered by linking pageid if you don't specify multiple values for blnamespace, or by namespace then pageid if you do.

It may be better to use prop=linkshere rather than list=backlinks. That module is much less complicated and hacky.
 


Brad, thanks for clarification.
Are there any other reason to use linkshere instead of backlinks? I mean it's not so rare to have more confidence in a recent (re)implementation of some feature (as a developer I'm also no exception). For example, it might be that if some novelty is on the agenda, it is more likely it will be implemented exclusively in linkshere module since it's more recent and stable rather than in both. 

_______________________________________________ Mediawiki-api mailing list [hidden email] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backlinks list order

Brad Jorsch (Anomie)
On Sat, Jun 3, 2017 at 3:24 AM, Max Vlasov <[hidden email]> wrote:
Are there any other reason to use linkshere instead of backlinks?

linkshere can take multiple titles as input.

On Sat, Jun 3, 2017 at 3:58 AM, Martin Domdey <[hidden email]> wrote:
Do we get data from different wikibase table columns using API linkshere or using API backlinks?

Neither returns "wikibase table columns". They both return data from the MediaWiki pagelinks table.
 
Why is the one "less complicated and hacky" than the other?

backlinks does multiple queries to do some sort of redirect resolution, but at the same time is limited to a single title parameter. Its queries could probably use some improvement.


--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Loading...