{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "SearchFail",
    "type": "object",
    "additionalProperties": false,
    "description": "TAnalytics-v2 .. 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/v2/LogContext.json",
            "description": "Required Log Context Reference"
        },
        "event_name": {
            "type": "string",
            "enum": ["SEARCH_FAIL"]
        },
        "schema_definition": {
            "type": "string",
            "enum": ["SearchFail"]
        },
        "trigger": {
            "$ref": "/resources/schema/analytics/client/v2/SearchTriggerType.json",
            "description": "Reqired Starting Point of the Search in the app"
        },
        "mode": {
            "$ref": "/resources/schema/analytics/client/v2/SearchMode.json",
            "description": "Method of organizing search results"
        },
        "sort_type": {
            "$ref": "/resources/schema/analytics/client/v2/SearchType.json",
            "description": "Method of organizing search results"
        },
        "transaction_id": {
            "type": "string",
            "description": "Search transaction ID for the request"
        },
        "gecoding_source": {
            "type": "string",
            "description": "Search geocoding source for the request"
        },
        "term": {
            "type": "string",
            "description": "Search term entered by user (entire string)"
        },
        "srp_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v2/SearchListItem.json"
            },
            "minItems": 1,
            "uniqueItems": true,
            "description": "Required List of EntityIDs,Impression IDs,positions on SRP. The only scenario where srp_list would not be present is when search returns no matches."
        },
        "entity_id": {
            "type": "string",
            "description": "Required .. EntityID of the destination for which route was calculated."
        },
        "search_id": {
            "type": "string",
            "description": "LogID of the search event that triggered the first result page. For example, in case of pagination, the second search event logged (i.e. the 2nd page) should capture search_id as the log id of the search that rendered the first page. For the first page search_id would be same as log_id."
        },
        "parent_log_id": {
            "type": "string",
            "description": "The LogID of triggering event"
        },
        "route_id": {
            "type": "string",
            "description": "The LogID of the route id"
        },
        "autosuggest_id": {
            "type": "string",
            "description": "The LogID of the Autosuggest that was selected to initiate the search"
        },
        "autosuggest_iid": {
            "type": "string",
            "description": "The ImpressionID from the Autosuggest result that was selected to initiate the search"
        },
        "display": {
            "$ref": "/resources/schema/analytics/client/v2/DisplayType.json",
            "description": "Required 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"
        }
    },
    "required": [
        "log_context",
        "event_name",
        "schema_definition",
        "trigger",
        "display"
    ]
}