Returns highlighting for a single object
Produces highlighting snippets for a single object based on a given query.
1{2 "type": "report",3 "id": "1698c5f2-86da-49f5-b762-2f1cf2a1f9e0",4 "query": {5 "type": "text",6 "text": "report:fox CHILD_QUERY(notes,%notes.note:jump%)",7 "language": "lucene",8 "modes": [9 "standard"10 ]11 },12 "includeFieldHighlighting": true,13 "defaultChildEntityLimit": 10,14 "fieldHighlighting": {15 "report": [16 "The quick brown <em>fox</em>"17 ]18 },19 "childEntityHighlighting": {20 "notes": {21 "start": 1,22 "limit": 10,23 "count": 2,24 "childObjects": [25 {26 "id": "c27a9862-d9e9-46ec-a3c1-bd0a1420a436",27 "highlighting": {28 "note": [29 "<em>jumped</em> over the lazy dog"30 ]31 }32 },33 {34 "id": "91dae554-756b-43e8-ac13-db77f7ab0a59",35 "highlighting": {36 "note": [37 "<em>jumped</em> over the sleeping horse"38 ]39 }40 }41 ]42 }43 }44}
The request to /highlighting for generating highlighting snippets for a single object based on a given query
Name | Type | Required | Description |
---|---|---|---|
version | integer | false | The representation version (1). |
type | string | false | The type of the object. |
id | string | false | The identifier of the object. |
query | Query or anyOf QueryTypeAndQueryTypeCompoundQueryTypeObjectQueryTypeOrQueryTypeText | false | The different query types that can be used to search for objects. See specific query definitions for more details. |
includeFieldHighlighting | boolean | false | Whether to include highlighting snippets for the top-level fields. |
defaultChildEntityLimit | integer | false | The default limit for child entities. The value of this parameter will be used if there is no specific limit in childEntityHighlightingParameters. Setting this parameter to 0 will exclude highlighting for child objects from the response. The default value is 10. |
childEntityHighlightingParameters | object | false | The parameters for each child entity keyed by child entity name. |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The request succeeded. | Schema | |
400 | Bad Request | The request is malformed or contains invalid parameter values. | Schema |