Skip to content

Field information ​

Metadata about a field, including indexing settings, field values and more. For annotated fields, info about annotations, spans and relations.

URL : /blacklab-server/corpora/<corpus-name>/fields/<fieldname>

Method : GET

Parameters ​

Parameter Description
listvalues Comma-separated list of annotations we want to list the values for, or * for all.
limitvalues Maximum number of values to return. Default: 200
relclasses Relation classes to return. Default: all

Terms and frequencies will be returned under the terms key (API v4+) or values key (old API). valueListComplete will indicate if all values are listed. Frequencies are only valid if the list is complete (if not, all frequencies will have the value 1).

Success Response ​

HTTP response code: 200 OK

Content examples ​

Response for /corpora/BaB/fields/title?custom=true (API v5):

json
{
  "fieldName": "title",
  "isAnnotatedField": false,
  "type": "TOKENIZED",
  "analyzer": "DEFAULT",
  "custom": {
    "displayName": "Title",
    "uiType": "",
    "unknownCondition": "NEVER",
    "unknownValue": "unknown",
    "displayValues": {
    }
  },
  "fieldValues": {
    "To A. Soomerkamp, 7 november 1780": 1,
    "To A.W.H. Nolthenius, 11 november 1780": 1,
    "To Aart van den Broeke, 21 oktober 1780": 1,
    ...
  },
  "valueListComplete": false
}

Response for an annotated field:

json
{
  "fieldName": "contents",
  "isAnnotatedField": true,
  "count": {
    "tokens": 459354,
    "documents": 1033
  },
  "custom": {
    "displayName": "Contents",
    "displayOrder": [
        "word_or_lemma",
        "word",
        "word_xml"
        //...
    ],
    "description": "Contents of the documents."
  },
  "hasContentStore": true,
  "mainAnnotation": "word_or_lemma", 
  "defaultSearchAnnotation": "word_or_lemma",
  "annotations": {
    "word_or_lemma": {
      "custom": {
          "displayName": "Word or lemma",
          "description": "",
          "uiType": "combobox"
      },
      "hasForwardIndex": true,
      "sensitivity": "ONLY_INSENSITIVE",
      "offsetsAlternative": "i",
      "isInternal": false
    },
    "word": {
      "custom": {
        "displayName": "Word",
        "description": "",
        "uiType": "combobox"
      },
      "hasForwardIndex": true,
      "sensitivity": "SENSITIVE_AND_INSENSITIVE",
      "offsetsAlternative": "",
      "isInternal": false
    },
    "word_xml": {
      "custom": {
        "displayName": "",
        "description": "",
        "uiType": ""
      },
      "hasForwardIndex": true,
      "sensitivity": "ONLY_INSENSITIVE",
      "offsetsAlternative": "",
      "isInternal": true
    },
    "lemma": {
      "custom": {
        "displayName": "Lemma",
        "description": "",
        "uiType": "combobox"
      },
      "hasForwardIndex": true,
      "sensitivity": "SENSITIVE_AND_INSENSITIVE",
      "offsetsAlternative": "",
      "isInternal": false
    },
    ...
  }
}

Notes ​

This is the same information the /corpus/<corpus-name> endpoint returns for all fields.

Apache license 2.0