Skip to contents

Operators

Usage

x %OR% y

x %AND% y

x %NOT% y

x %BY% y

x %IN% y

x %TO% y

Arguments

x, y

A (list of) character vector.

Value

A character string.

See also

Other query tools: hal_facet(), hal_filter(), hal_group(), hal_query(), hal_select(), hal_sort()

Author

N. Frerebeau

Examples

## Infix operators are composed left to right
c("aluminium", "fer") %BY% 3 %IN% "title_t"
#> [1] "title_t:\"aluminium fer\"~3"

## We need parenthesis
("ecology" %IN% "title_t") %AND% ("cell" %IN% "text")
#> [1] "title_t:ecology AND text:cell"

## A vector allows to combine all the terms with OR
c("Histoire", "History") %IN% "title_t"
#> [1] "title_t:(Histoire OR History)"

## A list allows to combine terms with AND
list("Paris", "France", "history") %NOT% list("Texas", "history")
#> [1] "(Paris AND France AND history) NOT (Texas AND history)"