-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support query in a helper function #220
Comments
Hello @dpriskorn I wonder how to create this function to be easily understandable by the user.
I started with the first one, but there is so much different case (has/hasnot, AND/OR, etc.), so i'm afraid the user will be lost. |
I'm thinking pass a string for now and a limit will suffice. We can just link to the documentation. 😃 |
There is probably no good way to support CirrusSearch without it being too complicated. |
I am definitely interested in this functionality and would be happy to have a simple string as the parameter. For instance, the documentation gives the example of wbi_helpers.search_entities("kitten haswbstatement:P31=Q3305213") But this confusingly returns While a more complex method taking dict or Claim could be implemented, a string seems good enough for the web UI and it's good enough for my use cases. |
I've created the #436 to add a call to the query/search API endpoint. It's good for you? |
I would like it documented also with a Wikibase cirrus search example also. I can submit a patch if you would like 😀 |
With pleasure 😄 |
@LeMyst This works great for my use cases. Thank you! |
https://www.wikidata.org/w/api.php?action=help&modules=query
that module enables search using the cirrussearch extensions on Wikidata, see https://www.mediawiki.org/wiki/Help:Extension:WikibaseCirrusSearch
It is much more powerful than wbsearchentities it seems.
Example search is here: https://www.wikidata.org/w/api.php?format=json&action=query&list=search&srprop=&srlimit=10&srsearch=-haswbstatement:P31=Q13442814%20-haswbstatement:P31=Q5633421%20breast%20cancer
The text was updated successfully, but these errors were encountered: