{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Search",
    "type": "object",
    "additionalProperties": false,
    "description": "TAnalytics-v4 .. Any time search engine was used and final list of results was returned. This could be an explicit request by the user or recommendations by the app.",
    "properties": {
        "log_context": {
            "$ref": "/resources/schema/analytics/client/v4/LogContext.json",
            "description": "Required Log Context Reference"
        },
        "event_name": {
            "type": "string",
            "enum": ["SEARCH"]
        },
        "schema_definition": {
            "type": "string",
            "enum": ["Search"]
        },
        "transaction_id": {
            "type": "string",
            "description": "Search transaction ID for the request"
        },
        "trigger": {
            "$ref": "/resources/schema/analytics/client/v4/type/SearchTriggerType.json",
            "description": "Reqired Starting Point of the Search in the app"
        },
        "term": {
            "type": "string",
            "description": "Search term entered by user (entire string)"
        },
        "srp_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/item/SearchListItem.json"
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "List of EntityIDs,Impression IDs,positions on SRP. The only scenario where srp_list would not be present is when search returns no matches."
        },
        "display": {
            "$ref": "/resources/schema/analytics/client/v4/type/DisplayType.json",
            "description": "Display mode of SRP"
        },
        "category_id": {
            "type": "string",
            "description": "POI category ID for the search initiated"
        },
        "category": {
            "type": "string",
            "description": "POI category like Coffee, Gas, ATM, etc"
        },
        "subcategory": {
            "type": "string",
            "description": "Log the subcategory if any. For example when user clicks on restaurants there may be a sub option of American, Mexican, etc."
        },
        "impression_limit": {
            "type": "number",
            "description": "Limit on the number of impressions displayed on a page"
        },
        "interaction_method": {
            "$ref": "/resources/schema/analytics/client/v4/type/InteractionMethodValues.json",
            "description": "for each user interaction log the interation method"
        },
        "time_taken": {
            "type": "number",
            "description": "Time taken for the response (in milliseconds)"
        },
        "event_label":{
            "type":"string",
            "description":"The label of the button or the icon interacted with"
        }
    },
    "required": [
        "log_context",
        "event_name",
        "schema_definition",
        "transaction_id",
        "trigger",
        "display",
        "term",
        "srp_list",
        "impression_limit",
        "time_taken"
    ]
}