GET /searchΒΆ
Request Parameters:
Parameter | Type | Description |
---|---|---|
q | String | Lucene search String |
sid | String | TextGrid SessionID from tgauth |
target | String | where to do fulltext-searches: one of “structure”, “metadata” and “both”, defaults to “both” |
order | String | key-value ascending (asc) or descending (desc) and metadata-field like asc:title or desc:author |
start | Integer | result number to start with |
limit | Integer | number of entries to return |
kwicWidth | Integer | number of chars before and after a kwic match |
wordDistance | Integer | max distance beetween two words in fulltext query. ignored if set to a number < 0, then for a hit all words must be contained in one document. defaults to -1 |
path | Boolean | path of found result(work->edition->aggregations) should be applied to hit |
allProjects | Boolean | all Projects should be searched for public data, warning: this query may be slow, if many results found |
sandbox | Boolean | show sandboxed (not yet finally published) data |
filter | String | add filter on query results, e.g. for faceting (TODO: Syntax) |
Response:
List of TextGrid objects found. XML, using the textgrid medataschema
Example request:
curl https://textgridlab.org/1.0/tgsearch-public/search?q=waldeinsamkeit
Example response:
<tgs:response hits="84" session="deprecated" start="0" limit="20">
<tgs:result>
<object>
<generic>
<provided>
<title>Waldeinsamkeit</title><format>text/tg.work+xml</format>
</provided>
<generated>
<created>2012-01-29T23:35:36.930+01:00</created>
<lastModified>2012-01-29T23:35:36.930+01:00</lastModified>
<issued>2012-01-29T23:35:36.930+01:00</issued>
<textgridUri extRef="">textgrid:rnqb.0</textgridUri>
<revision>0</revision>
<pid pidType="handle">hdl:11858/00-1734-0000-0003-EFDA-1</pid>
<extent>38</extent>
<dataContributor>tvitt@textgrid.de</dataContributor>
<project id="TGPR-372fe6dc-57f2-6cd4-01b5-2c4bbefcfd3c">Digitale Bibliothek</project>
<availability>public</availability>
</generated>
</generic>
<work>
<agent role="author" id="pnd:119002248">Lingg, Hermann von</agent>
<dateOfCreation notBefore="1820" notAfter="1905"></dateOfCreation>
<genre>verse</genre>
</work>
</object>
</tgs:result>
[...]
</tgs:response>