PrimaryTimelineSearch Command

Use the PrimaryTimelineSearch command in a Logic Template to search a primary timeline index or a sliding timeline index for records containing a date/time value that lies within the same sub-timeline as a user specified date and time, or to locate records containing a date/time value that lies within a sub-timeline that is touched by a user specified date-time range. To obtain exact results, the records returned by the search request should then be filtered by either the DateFilter command or by the TimeFrameFilter command.

Only the PrimaryTimelineSearch command can be used to search either a primary timeline index or sliding timeline index. And, only a primary timeline index or sliding timeline index should be searched using the PrimaryTimelineSearch command.

The results from the search of all primary indexes within a single pass are ORed together, then used to restrict the overall search results from that pass in a highly optimized manner. The restricted results from the current pass are then ORed to the results from all other passes.

To execute a Search Primary Timeline Index request, use the PrimaryTimelineSearch command with three arguments:

PrimaryTimelineSearch( idx, date, pas );

PrimaryTimelineSearch Arguments

Argument

Description

idx

The primary timeline index or sliding timeline index to be searched.

date

The HTML variable containing the first and final time in the requested range or the only time in the requested range.

pas

The pass during which the search is to be executed.

Access the PrimaryTimelineSearch Dialog Box by selecting the Timeline Index->Primary Index menu item under the Searching category of the Logic Template editor command menu.

Examples

Command

Description

PrimaryTimelineSearch( PublicationDateindex, ArticleDate, 1 );

Search primary timeline index named "PublicationDateIndex" during pass 1. Search for the value stored in HTML variable "ArticleDate" and OR results with other indexes.

ArticleDate = "15 Nov 2003";

PrimaryTimelineSearch( PublicationDateindex, ArticleDate, 3 );

Search primary timeline index named "PublicationDateIndex" during pass 3. Search for the date "November 15, 2002" and AND results with other indexes.

IF ( ArticleDate )

PrimaryTimelineSearch( PublicationDateindex, ArticleDate, 1 );

ENDIF

If the HTML variable contains something other than zero, search the primary timeline index named "PublicationDateIndex" during pass 1 for the value stored in HTML variable "ArticleDate" and OR the results to other indexes.

ArticleDates = ["today - 6 days" :: "tomorrow" ];

PrimaryTimelineSearch( PublicationDateindex, ArticleDates, 3 );

Search timeline index named "PublicationDateIndex" during pass 3. Search for articles from the last seven days and AND results with other indexes.

IF ( ArticleDates )

PrimaryTimelineSearch( PublicationDateindex, ArticleDates, 1 );

ENDIF

If the HTML variable contains something other than zero, search the timeline index named "PublicationDateIndex" during pass 1 for articles from the time period stored in HTML variable "ArticleDates" and OR the results to other indexes.