follow

Purpose

Matches the records which hold a sequence of up to range sentences, containing the terms in the specified order.

Syntax

follow([range], term1,term2…​)

Arguments

The function accepts several arguments:

  • The first optional argument range sets the range of sentences; if the range is not specified, the whole text is considered.

  • The second and the next arguments define the terms to search for; the number of them is unlimited; the order of them is important.

The function also supports optional named parameters:

  • allow_punct:=yes/no allows or prohibits punctuation between arguments (set to "yes" by default).

  • allow_space:=yes/no allows or prohibits spaces between arguments (set to "no" by default).

  • match:=range matches text range starting from the first found term and ending with the last found term.

  • match:=inverse matches text range starting from the first found term and ending with the last found term except for the specified arguments.

Returned Value

Documents matching the query.

Examples

follow(1, economy, crisis) matches economy and crisis within one sentence;

follow(2, produce, company) matches "Shafik also said that SNC hopes to produce a 100 per cent Malaysian-made biometric security product and system by 2010. Currently, the company is only in charge in R&D, while the technology itself comes from the US";

follow(2, produce, company, match:=range) matches "Shafik also said that SNC hopes to produce a 100 per cent Malaysian-made biometric security product and system by 2010. Currently, the company is only in charge in R&D, while the technology itself comes from the US".