Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
titleEvent format
"assoc": {
	"entity1": { ... }, // the "subject"; can be ftext, etext, or entity/entityValue/entityType query terms
	"entity2": { ... }, // the "object"; can be ftext, etext, or entity/entityValue/entityType query terms

	"verb": string,

	"geo": { ... }, // geo query term
	"time": { ... }, // time query term

	"type": string // "Event", "Fact", or "Summary"
}

...

  • The "entity1" field is processed as follows:
    • "ftext" and "etext" terms are applied across both the "entity1" and "entity1_index" fields within the entity object.
    • entity/entityValue/entityType terms are only applied to the "entity1_index" field
  • The "entity2" field is processed analogously 
  • The "verb" string is applied as an exact text query to the "verb_category" field and a free text query to the "verb" field within the entity object
  • For events with a time range ("time_start" and "time_end" fields), any part of the event time range can match the "time" term.
  • The difference between "Events", "Facts" or "Summaries" is described here.
  • If multiple terms are specified then these are ANDed together. There is currently no way of performing more complex boolean equations on individual events (obviously multiple event query terms can be specified and match across all events within a document).
  • Event queries with multiple terms can be a bit slower than other queries (due to its implementation in ElasticSearch).

    Code Block
    languagejavascript
    titleExample event queries
    // Any fact in which Barack Obama is the subject:
    {
    	"associationassoc": {
    		"entity1": {
    			"entity": "barack obama/person"
    		},
    		"type":"Fact"
    	}
    }
    // Travel associations involving Sarah Palin:
    {
    	"associationassoc": {
    		"entity1": {
    			"entityValue":"sarah palin",
    			"entityType":"person"
    		},
    		"verb": "travel",
    	}
    }
    // Events in the future:
    {
    	"associationassoc": {
    		"time": {
    			"min": "now"
    		},
    		"type":"Event"
    	}
    }

...