wbsearchentities is a Wikibase-specific API; the normal MediaWiki search function uses a different search configuration, which you can query in the API via:
action=query&generator=search&gsrsearch=SEARCHTERM&gsrnamespace=0|120
For example:
Note that you need to sort the result list by the 'index' of each result (I’m not sure why the API doesn’t do that for you).
Cheers,
Lucas
Hi,
The search results obtained by these two approaches are ordered differently:
method1: using the wikidata API
method2: search on wikidata Page
Intrestingly, in method2, the search suggestion drop-down list has the same order as that of method1 (see screenshot).
q1. How can I obtain results in the same order as that of method2 using the wikidata API (i.e., method 1).
q2. Which of the two ordering is in general more "relevant/accurate/better"
Thanks for any help/hints.
Best regards,Raveesh
_______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata