include

Purpose

Finds documents that contain occurrences of the first argument which are also included in occurrences of the second argument.

Syntax

include(term_1, term_2)

Arguments

The function takes two required arguments.

The function also supports the optional named parameter match which takes one of the following values:

Value

Explanation

first

the first argument entirely (default value)

second

the second argument entirely

union

arguments’ union

difference

arguments’ symmetric difference, i.e. items which are in either of the sets, but not in their intersection

Moreover, the function supports the optional named parameter diff that sets a limitation of the possible difference between arguments in words. Thus, diff is a difference between the arguments' intersection and the quantity of words they have in common. It is possible to indicate two diff parameters defining upper and lower bound of the allowed difference.

In order to limit a search, one can use the operators :=, :>, :>=, :<, :<=.

Returned Value

Documents matching the query.

Examples

include(inova,"inova fairfax hospital", match:=first) matches "inova fairfax hospital".

include(inova,"inova fairfax hospital", match:=second) matches "inova fairfax hospital".

include(inova,"inova fairfax hospital", match:=difference) matches "inova fairfax hospital".

include(1, "1 2 3 4 5 6", match:=union) matches "1 2 3 4 5 6".

include("Fairfax County Police", entity(Organizations), diff:=0) matches organizations equal (including punctuation) to the phrase "Fairfax County Police".

include("Detention Center", entity(Organizations), diff:<=1) matches "Detention Center" in the organization name "Juvenile Detention Center" that differ from "Detention Center" by one word.

include("Health Department", entity(Organizations), diff:>=1, diff:<=2) matches "Health Department" in the organization name "Fairfax County Health Department" that differ from "health department" by two words.