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

snapshot

The name of the snapshot.

selection

Optional. The name of a selection.

query

The query on the text of the chunk

domain

Optional. A specific domain.

reference

Optional. A reference/path.

maxReferenceSegments

Optional. The max. number of segments in the reference/path (e.g. www.myurl.de/home/new has referenceSegments of 2)

language

Optional. A specific language (e.g. 'en' or 'de'.

minToken

Optional. Defines the minimum number of tokens in a returned chunk. Defaults to 15

limit

Defines how many results should be returned. Defaults to 100

Example
$ 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: 1176

{
  "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",
    "language" : "de"
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.che.de",
    "reference" : "/cms/?getobject=260&straction=show&pk_projekt=56&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",
    "language" : "de"
  } ],
  "page" : {
    "size" : 2,
    "number" : 0,
    "totalElements" : 2,
    "totalPages" : 1
  },
  "links" : { }
}

/api/chunks/queryAggrByDomain

Returns a List of Counts of each domain with the number of hits of the provided IndexQuery.

Parameter Description

snapshot

The name of the snapshot.

selection

Optional. The name of a selection.

query

The query on the text of the chunk

language

Optional. A specific language (e.g. 'en' or 'de'.)

minToken

Optional. Defines the minimum number of tokens in a returned chunk. Defaults to 15

Example
$ curl 'http://localhost:8080/api/chunks/queryAggrByDomain?snapshot=20121227_intermediaries&query=forschung' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 49
Content-Type: application/json
Content-Length: 2852

{
  "responseHeader" : {
    "httpStatus" : null,
    "msg" : "",
    "query" : "http://localhost:8080/api/chunks/queryAggrByDomain?snapshot=20121227_intermediaries&query=forschung",
    "state" : "OK"
  },
  "content" : [ {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.dfg.de",
    "count" : 3069
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.hrk.de",
    "count" : 1949
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.che.de",
    "count" : 865
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.acquin.org",
    "count" : 502
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "eleru.leru.org",
    "count" : 48
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.fibaa.org",
    "count" : 40
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.ciep.fr",
    "count" : 13
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.oaq.ch",
    "count" : 12
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.euroscience.org",
    "count" : 8
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "new.eua.be",
    "count" : 6
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.eua.be",
    "count" : 6
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.nvao.net",
    "count" : 6
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.aca-secretariat.be",
    "count" : 5
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.aqas.de",
    "count" : 5
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.oecd.org",
    "count" : 5
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "eacea.ec.europa.eu",
    "count" : 4
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.nuffic.nl",
    "count" : 4
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.sciencebusiness.net",
    "count" : 4
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "erc.europa.eu",
    "count" : 3
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.allea.org",
    "count" : 2
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.britishcouncil.org",
    "count" : 2
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.eaie.org",
    "count" : 2
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.esf.org",
    "count" : 2
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.worldbank.org",
    "count" : 2
  }, {
    "snapshot" : "20121227_intermediaries",
    "domain" : "www.acadeuro.org",
    "count" : 1
  } ],
  "page" : {
    "size" : 25,
    "number" : 0,
    "totalElements" : 25,
    "totalPages" : 1
  },
  "links" : { }
}