3

I'm exploring wiki apis...

Based on the below post, i 've some doubts. Wikipedia list=search REST API: how to retrieve also Url of matching articles

I need to fetch the wiki URLs for my search. So I used generator=search instead of list=search

But the results got from both methods vary in the order they are returned.

Can someone tell me based on what factor the results are being ordered in generator method?

sample try:

Community
  • 1
  • 1
deeshank
  • 4,286
  • 4
  • 26
  • 32
  • 1
    Good question. The entries of one generator page seem to be sorted alphabetically by title. – Bergi Nov 21 '12 at 17:48
  • 4
    Why does that matter to you? The `search` module doesn't have `sort` parameter, so I think that means the order is undefined. – svick Nov 21 '12 at 21:12
  • The search results always have a score. In a `list`, it is arranged by its score, but in a `generator`, it is sorted by `pageid`. Although, you won't lose the search ranking, it is given by the `index`. – John Strood Jul 27 '18 at 10:37
  • @Bergi Nope, it is actually sorted by `pageid`, and not `title`. – John Strood Jul 27 '18 at 10:39

0 Answers0