Versions Compared

Key

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

...

Saved queries generated either directly from the API, or via the plugin manager GUI can be accessed via the API using the "ftext" query, simply create an ftext query with the custom job's name or _id prefixed by "$cache", eg:

...

Code Block
languagejavascript
titleTemporal format
{
	"time": {
		"min": string,
		"max": string
	}
	// AND OPTIONALLY
	"entityOpt": { // (deprecated)
		"lockDate": boolean
	}
}

One of "min" and "max" must be specified. If one of them is not specified, time is not bounded in that direction (eg if "min" is not specified then it means "all times before max"; if "max" is not specified then it means "all times after min").

...

  • "now" which always resolves to the current time, 
  • "now-XXX" where XXX can be a standard qualifier like "1d", "4d", "1w", etc: a period relative to now.
  • "midnight" which always resolves to midnight of the previous day
  • "midnight-XXX" where XXX can be a standard qualifier like "1d", "4d", "1w", etc: a period relative to last midnight.
  • any Unix time (ie milliseconds after "Jan 1 00:00:00 1970"), 
  • and the following date/date-time formats: "yyyy'-'DDD", "yyyy'-'M'-'dd", "yyyyMMdd", "dd MMM yyyy", "dd MMM yy", "MM/dd/yy", "MM/dd/yyyy", "MM.dd.yy", "MM.dd.yyyy", "dd MMM yyyy hh:mm:ss", "yyyy-MM-dd" (ISO Date), "yyyy-MM-ddZZ" (ISO Date-Timezone", "yyyy-MM-dd'T'HH:mm:ssZZ" (ISO DateTime-Timezone), "EEE, dd MMM yyyy HH:mm:ss Z" (SMTP DateTime).
Info

(The following option is deprecated but is used by the UI - the extended syntax described above is preferred)

If "entityOpt.lockDate" is set then the max time is fixed to "now", and the min time is adjusted to keep the period constant. To fix the min time instead of the max time, simply reverse min/max in the query term. If max is not specified, then the min time is set to "now" instead - eg "all future dates"

Examples:

  • { "qt": [ { "time": { "min": "1284666757164", "max": "now" } } ] }: from 16 Sep 2010 until now.
  • qt[0].time.min="now": any time in the future.
  • qt[0].time.max="20100201": any time before 1 Feb 2010.
  • { "qt": [ { "time": { "min": "02/10/2000", "max": "10 Feb 2001 13:00:00" } } ] }: from 10 Feb 2000 until 10 Feb 2001 at 1pm.

...