Closed eroux closed 6 years ago
see http://buda1.bdrc.io/queries for a json list of the query templates and (for instance) see http://buda1.bdrc.io/queries/Topic_byAllNames.arq for a json description of the templates, including the demo link
Note the actual usage of the query template using GET/POST/POST JSON is already implemented in the main query template service. Ex:
http://buda1.bdrc.io/resource/templates?searchType=Topic_byAllNames&L_NAME=rgyud (GET)
curl --data "searchType=Res_byName&L_NAME=(\"mkhan chen\" AND (\"'od zer\" OR \"ye shes\"))&LG_NAME=bo-x-ewts&I_LIM=100" http://localhost:8080/resource/templates (POST)
curl -H "Content-Type: application/json" -X POST -d @test.json http://localhost:8080/resource/templates (POST JSON)
(as a general observation, it tends to be perceived as rude to close an item opened by someone else, the usual protocol is to ask the person who opened the issue if it's ok to be closed)
Looks good! A few remarks:
name
, maybe id
could be used? Also, maybe it could include the public/
part?.arq
part of the name/id is not used consistently and should never appear (I think)?ID
which is the ID of the resource and which is a urlqueryParams
should make clear that there are in fact two params, L_NAME
and LT_NAME
queryString
field? It seems quite gratuitous...demoLink
field, I think it would be better if the various arguments had an example
field for examplequeryParams
should be more developed, something like:"queryParams": {
"L_NAME": {
"type": "string",
"langTagArgument": "LT_NAME",
"acceptsLuceneQueries": true,
"description": "the name of the person",
"example": "this is an example"
}
}
I think it's all done now (since commit 23bd0f1)
Ok, I'll open a separate issue for the remaining issues
It would be interesting to have a REST JSON API for the queries (using these concepts). It could list the queries when going on
/query/
, then a description of the queryABC
on/query/ABC
(the arguments, results, etc.), then another url (which one?) for running the query