Versions Compared

Key

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

...

The "ftext" field represents an arbitrary Lucene query (Lucene syntax). By default, all text fields in the document (including its entities and events; link to the document format) are included in the query, though the standard "field:text" syntax can be used.

...

In the first instance the "entity" string is in the format "entityValue/entityType" (this is its "index" form, eg "gazateer_index" in the Entity JSON object).

In the second, decomposed, instance either of "entityValue" or "entityType" can be left out (in the first case this would match on all entities of a given type; in the second case, it would match on all entity names regardless of the type).

...

  • 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:
    {
    	"event": {
    		"entity1": {
    			"entity": "barack obama/person"
    		},
    		"type":"Fact"
    	}
    }
    // Travel events involving Sarah Palin:
    {
    	"event": {
    		"entity1": {
    			"entityValue":"sarah palin",
    			"entityType":"person"
    		},
    		"verb": "travel",
    	}
    }
    // Events in the future:
    {
    	"event": {
    		"time": {
    			"min": "now"
    		},
    		"type":"Event"
    	}
    }

...