{
    "$schema" : "http://json-schema.org/draft-04/schema#",
    "title" : "Search",
    "type" : "object",
    "additionalProperties" : false,
    "description" : "TAnalytics-v1 .. Any time search API was invoked. This could be an explicit request by the user or recommendations by the app.",
    "properties" : {
        "log_context" : {
            "$ref" : "/resources/schema/analytics/service/entity/v1/LogContext.json",
            "description" : "Required Log Context Reference"
        },
	"event_name":{
	    "type": "string",
	    "enum": ["SEARCH"]		
	},
	"schema_definition":{
	    "type": "string",
	    "enum": ["Search"]
	},
        "trigger" : {
            "$ref" : "/resources/schema/analytics/service/entity/v1/SearchTriggerType.json",
            "description" : "Reqired Starting Point of the Search in the app"
        },
        "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)"
        },
        "coordinate_list" : {
            "type" : "array",
            "items" : {
                "$ref" : "/resources/schema/analytics/service/entity/v1/CoordinateListItem.json"
            },
            "uniqueItems" : true,
            "description" : "List of Lat/Lons passed to the Search API. List is passed when trigger for search is waypoint and bounding box."
        },
        "srp_list" : {
            "type" : "array",
            "items" : {
                "$ref" : "/resources/schema/analytics/service/entity/v1/SearchListItem.json"
            },
            "uniqueItems" : true,
            "description" : "List of EntityIDs,positions, entity type, lat, lon of places on SRP. The only scenario where srp_list would not be present is when search returns no matches."
        },
        "is_personalized" : {
            "type" : "boolean",
            "description" : "Whether results were personalized or not."
        },
        "category_id" : {
            "type" : "string",
            "description" : "POI category ID for the search initiated"
        },
        "category" : {
            "type" : "string",
            "description" : "POI category like Coffee, Gas, ATM, etc"
        },
        "impression_limit" : {
            "type" : "number",
            "description" : "Limit on the number of impressions requested for."
        }
    },
    "required" : [
        "log_context",
        "event_name",
        "schema_definition",
        "trigger",
        "term",
        "transaction_id"
    ]
}