-
Notifications
You must be signed in to change notification settings - Fork 3
Service: Search GET
Eliza Margaretha edited this page Mar 12, 2018
·
34 revisions
Returns query result for the given query according to the other given parameters.
Available in: lite and full version
Method: GET
Service URL: root/search
Header Parameter (Optional)
Name | Required | Authentication scheme | Value |
---|---|---|---|
Authorization | yes | Bearer, Api | Api token from authentication token service |
Query Parameters
Name | Required | Description | Type | Value |
---|---|---|---|---|
q | yes | search query | String | depends on ql |
ql | yes | query language | String | poliqarp, cosmas2, annis, cql, fcsql |
v | no | query language version number | String | 1.1 or 1.2, default: 1.2 (only applicable for CQL) |
context | no | result context | String | “sentence”, “paragraph”, context-pattern: “<nr>-<type>,<nr>-<type>”, where type can be “t” for tokens and “c” for characters - the number defining the number of type in left context (left of the comma) and right context (right of the comma) |
count | no | page length | Integer | e.g. 25, 50, 100 |
offset | no | startindex parameter for paging | Integer | default: 0 |
page | no | startPage parameter for paging (if together with startIndex, startIndex will be used) | Integer | default: 1 |
cq | no | search query | String | e.g. corpusSigle=GOE |
cutoff | no | search query | Boolean | default: false |
Request example
http://localhost:8089/api/search?q=Wasser&ql=poliqarp
Request example with cURL and authentication token
curl -H "Authorization: Bearer 9zJGaHfIY.aNesHjol36R4a2lsBp7KDnlaroIHSlaTIlntelsk QWLSjaFNsTZxiodCOgiAVKFxmH1bwmK5D2WCMUs9BV1cRGFK3df85jtlDXeNaNQF3zSL1c9zhSoRE:NvC odkTVb3YEKDyJQbdz4nw8CRxod" -d http://localhost:8089/search?q=Wasser&ql=poliqarp
Output example
{ "@context": "http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld", "meta": { "count": 25, "startIndex": 0, "timeout": 120000, "context": { "left": [ "token", 6 ], "right": [ "token", 6 ] }, "fields": [ "pubDate", "subTitle", "author", "pubPlace", "title", "textSigle", "UID", "ID", "layerInfos", "corpusSigle", "docSigle", "corpusID", "textClass", "availability" ], "version": "0.55.9", "benchmark": "0.420108313 s", "totalResults": 188, "serialQuery": "tokens:s:Wasser", "itemsPerPage": 25 }, "query": { "wrap": { "@type": "koral:term", "layer": "orth", "match": "match:eq", "key": "Wasser", "foundry": "opennlp", "rewrites": [{ "@type": "koral:rewrite", "src": "Kustvakt", "operation": "operation:injection", "scope": "foundry" }] }, "@type": "koral:token", "idn": "Wasser_0", "rewrites": [{ "@type": "koral:rewrite", "src": "Kustvakt", "operation": "operation:injection", "scope": "idn" }] }, "matches": [ { "field": "tokens", "pubPlace": "München", "textSigle": "GOE/AGI/00000", "docSigle": "GOE/AGI", "corpusSigle": "GOE", "title": "Italienische Reise", "subTitle": "Auch ich in Arkadien!", "author": "Goethe, Johann Wolfgang von", "availability": "ACA-NC", "layerInfos": "corenlp/c=spans corenlp/p=tokens corenlp/s=spans dereko/s=spans malt/d=rels marmot/m=tokens marmot/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens", "startMore": true, "endMore": true, "license": "ACA-NC", "snippet": "<span class=\"context-left\"><span class=\"more\"> <\/span>Tirschenreuth steigt das Land noch. die <\/span> <span class=\"match\"><mark>Wasser<\/mark><\/span><span class=\"context-right\"> fließen einem entgegen, nach der Eger<span class=\"more\"><\/span><\/span>", "matchID": "match-GOE/AGI/00000-p234-235", "pubDate": "1982", "UID": 0 } ] }
- Setting LDAP
- Setting initial super client
- Setting a custom environment
- Setting resources for CLARIN FCS
- Disabling query rewrites
- Named virtual corpora
- Importing Kustvakt to Eclipse
- Installing Lombok
- Setting annotation processors
- Setting a test environment
- HTTP Basic Authentication
- OAuth2 authorization scopes
- OAuth2 authorization request
- OAuth2 token request
- OAuth2 token revocation
- OAuth2 client registration
- OAuth2 client info
- OAuth2 client deregistration
- OAuth2 client secret reset
- Plugin registration
- Plugin list (marketplace)
- Plugin installation
- Plugin uninstallation
- Installed plugin list
- VC creation and update
- VC deletion
- VC list
- VC info
- VC KoralQuery
- VC statistics
- VC statistics with KoralQuery