xsearch-methods: Search a Xapian database

Description Usage Arguments Details Value

Description

Search a Xapian database

Usage

1
2
3
4
5
6
xsearch(db, query, prefix = NULL, offset = 0, pagesize = 10,
  wildcard = FALSE, view = FALSE)

## S4 method for signature 'xapian_database,character'
xsearch(db, query, prefix = NULL,
  offset = 0, pagesize = 10, wildcard = FALSE, view = FALSE)

Arguments

db

A linkS4class{xapian_database} object.

query

A free-text query

offset

Starting point within result set. Default 0.

pagesize

Number of records to retrieve. Default 10.

wildcard

Support searches using a trailing '*' wildcard, which matches any number of trailing characters, so wildc* would match wildcard, wildcarded, wildcards, wildcat, wildcats, etc. Default is FALSE.

view

Invoke a text editor on the result before returning. This enables editing the result before it's returned. The editor is only opened if there are any response variables supplied in the prefix formula.

formula

A formula with symbolic specification of the data output and term prefixes. Default NULL. See 'Details'.

Details

The search plan for xsearch is specified symbolically. A search plan has the form data ~ field:prefix where data is the blob of data returned from a request as a data.frame. The columns of the data.frame can be specified, e.g. 'col1 + col2 ~ field:prefix'. To search prefixed terms it possible to add a human-readable prefix; for example 'data ~ title:S' to enable queries such as 'title:xapr'.

Value

xapian_search object with result


stewid/xapr documentation built on April 19, 2021, 2:03 p.m.