Closed prashnts closed 4 years ago
We currently use the query endpoint with full-text search generator. (Check out the API sandbox: https://to.noop.pw/wikiapi-sandbox--query).
query
full-text search
This works but the search results are not good. Example of what I mean by good is here:
Notice in the first example, the exact match is actually the third item in the list, and in second, there is no matches at all.
Compare this with the prefixsearch api used by Wikipedia's search box:
prefixsearch
pageprops
Relevant comment: https://github.com/CyberCRI/learn-ext/blob/986bbf2f6c453dd6b14310997bc1cb17e83fd67b/src/mixins/wikipedia.js#L174
Also related to #37 .
We currently use the
query
endpoint withfull-text search
generator. (Check out the API sandbox: https://to.noop.pw/wikiapi-sandbox--query).This works but the search results are not good. Example of what I mean by good is here:
Notice in the first example, the exact match is actually the third item in the list, and in second, there is no matches at all.
Compare this with the
prefixsearch
api used by Wikipedia's search box:Solution steps
prefixsearch
api for giving suggestionspageprops
query to get the wikidata ID and then add it to the list.Relevant comment: https://github.com/CyberCRI/learn-ext/blob/986bbf2f6c453dd6b14310997bc1cb17e83fd67b/src/mixins/wikipedia.js#L174
Also related to #37 .