debug

The debug:​* category contains stages useful for building your Lingo4G-based software or debugging analysis requests.

You can use the following debug stage in your requests:

debug:​explain

Returns the search score explanations for the document list and search query you provide.

debug:​progress

Runs a series of mock processing tasks of your choice. This stage should make it easier to develop and test the progress reporting part of your Lingo4G-based software.

debug:​explain

Returns Lucene's search score explanations for the document list and an optional search query.

{
  "type": "debug:explain",
  "documents": {
    "type": "documents:reference",
    "auto": true
  },
  "query": null
}

documents

Type
documents
Default
{
  "type": "documents:reference",
  "auto": true
}
Required
no

The reference to the source list of documents:​* whose scores should be explained.

query

Type
query
Default
null
Required
no

An optional query:​* component against which the explanations should be resolved. If not provided, the source query used to retrieve the documents will be used.

debug:​progress

Runs a series of mock processing tasks of your choice. This stage should make it easier to develop and test the progress reporting part of your Lingo4G-based software.

{
  "type": "debug:progress",
  "tasks": [
    {
      "name": "Task",
      "durationMs": 2000,
      "progressAvailable": true,
      "tasks": [],
      "fail": false
    }
  ]
}

tasks

Type
array of taskSpec
Default
[
  {
    "name": "Task",
    "durationMs": 2000,
    "progressAvailable": true,
    "tasks": [],
    "fail": false
  }
]
Required
no

An array of top-level tasks mocking stages that should be executed. This example shows a request with a simple nested task structure.

{
  "name": "Explanations of search scores for a set of documents.",
  "stages": {
    "debugTasks": {
      "type": "debug:progress",
      "tasks": [
        {
          "name": "Task 1",
          "durationMs": 100,
          "progressAvailable": true,
          "tasks": [
            {
              "name": "Task 1.1",
              "durationMs": 100
            },
            {
              "name": "Task 1.2",
              "durationMs": 50
            }
          ],
          "fail": false
        },
        {
          "name": "Task 2",
          "durationMs": 200
        }
      ]
    }
  }
}