Reputation: 11165
When I search in wiki UI for stack overflow
I get different results from the API.
In the UI:
https://en.wikipedia.org/w/index.php?search=Stack+Overflow&title=Special%3ASearch&profile=advanced&fulltext=1&ns0=1
The thing that I'm missing in the API is sort by relevancy.
How can that be achieved?
Upvotes: 2
Views: 202
Reputation: 614
The API result in fact contains the relevancy ranking. It is hidden in the index
property of each page. For example, the first result in the UI "Stack Overflow" has "index": 1,
.
(Curiously, the pages are ordered correctly when search
is used as a list, not a generator)
Upvotes: 2