Closed bablf closed 1 year ago
By default, the wd search
command uses the wbsearchentities
API endpoint (ex: searching drug used for treatment
), which is not great for fuzzy search, as I far as I understand, its based on a simple MySQL search.
wd search --cirrus
is a bit better, as it relies on ElasticSearch and the WikibaseCirrusSearch
extension, but then the --type
filder doesn't work.
Note that for that purpose, there is also the wd props
command, which has it own filtering mechanism (ex: wd props drug
), or can be piped to grep
, or even better, to fzf
, which does fuzzy search: wd props | fzf --query 'drug used for treatment' --exit-0 --select-1
Thanks for the swift response! fzf seems to work :hugs:
Some of the aliases returned by wd search -j
also seem to contain the old name.
@bablf wd props
downloads the full list once, and then use that local list, which might be out-dated: you can use wd props --reset
to force a refresh
The command
wd search --type property "drug used for treatment" --lang en
does not find any properties even thoughdrug or therapy used for treatment
exists.My question is how does the search work and how can it be improved?
drug used for treatment
seems to have been a used property a while ago. Here are some other old properties that can not be found any more: 'drug used for treatment',