Chunks
A set of Endpoints to discover information about available Chunks.
|
Important
|
Indexing of Chunks
Please note that only Chunks with a minimal token length of 15 are indexed. The reason behind that is towfold: 1.) normally one is interested in semantic rich Chunks and 2.) the indexing process and the Solr-Index don’t have to work on millions of simple short Chunks. Although there are (good) reasons for this decision, this might change in the future. |
/api/chunks/search
Returns a list of Chunks, queried on a full-text-index.
| Parameter | Description |
|---|---|
|
The name of the snapshot. |
|
Optional. The name of a selection. |
|
The query on the text of the chunk |
|
Optional. A specific domain. |
|
Optional. A reference/path. |
|
Optional. The max. number of segments in the reference/path (e.g. www.myurl.de/home/new has referenceSegments of 2) |
|
Optional. Defines the minimum number of tokens in a returned chunk. Defaults to 15 |
|
Defines how many results should be returned. Defaults to 100 |
$ curl 'http://localhost:8080/api/chunks/search?snapshot=20121227_intermediaries&query=forschung&limit=2' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 49
Content-Type: application/json
Content-Length: 1228
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/chunks/search?snapshot=20121227_intermediaries&query=forschung&limit=2",
"state" : "OK"
},
"content" : [ {
"snapshot" : "20121227_intermediaries",
"domain" : "www.che.de",
"reference" : "/cms/?getobject=260&straction=show&pk_projekt=138&getlang=de",
"referenceSegments" : 2,
"chunker" : "default",
"chunkTokenCount" : 15,
"chunk" : "MDgt. Dr. Josef Glombik, Abteilungsleiter, Abteilung Wissenschaft und Forschung, Ministerium für Wissenschaft, Forschung und Kultur"
}, {
"snapshot" : "20121227_intermediaries",
"domain" : "www.hrk.de",
"reference" : "/positionen/gesamtliste-beschluesse/position/convention/auf-dem-weg-zu-mehr-selbstverantwortung-und-flexibilitaet/",
"referenceSegments" : 6,
"chunker" : "default",
"chunkTokenCount" : 16,
"chunk" : "V. Forschung und wissenschaftlicher Nachwuchs \n\tWissenschaftlicher Nachwuchs\n\tForschung an den Fachhochschulen\n\tSchutzrechte\n\tUmgang mit wissenschaftlichem Fehlverhalten"
} ],
"page" : {
"size" : 2,
"number" : 0,
"totalElements" : 2,
"totalPages" : 1
},
"links" : { }
}