Marc Kupietz | cf1caf4 | 2019-09-07 19:19:31 +0200 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/KorAPQuery.R |
| 3 | \name{KorAPQuery} |
| 4 | \alias{KorAPQuery} |
Marc Kupietz | 62da2b5 | 2019-09-12 17:43:34 +0200 | [diff] [blame] | 5 | \title{Send a query to a KorAP connection.} |
Marc Kupietz | cf1caf4 | 2019-09-07 19:19:31 +0200 | [diff] [blame] | 6 | \usage{ |
Marc Kupietz | b125bdd | 2019-09-09 12:05:59 +0200 | [diff] [blame] | 7 | KorAPQuery(con, query, vc = NA, KorAPUrl = NA, metadataOnly = TRUE, |
Marc Kupietz | 62da2b5 | 2019-09-12 17:43:34 +0200 | [diff] [blame] | 8 | ql = "poliqarp", fields = defaultFields, accessRewriteFatal = TRUE) |
Marc Kupietz | cf1caf4 | 2019-09-07 19:19:31 +0200 | [diff] [blame] | 9 | } |
| 10 | \arguments{ |
| 11 | \item{con}{object obtained from \code{\link{KorAPConnection}}, that contains all necessary connection information} |
| 12 | |
| 13 | \item{query}{string that contains the corpus query. The query langauge depends on the \code{ql} parameter. Either \code{query} must be provided or \code{KorAPUrl}} |
| 14 | |
| 15 | \item{vc}{string describing the virtual corpus in which the query should be performed. An empty string (default) means the whole corpus, as far as it is license-wise accessible.} |
| 16 | |
| 17 | \item{KorAPUrl}{instead of providing the query and vc string parameters, you can also simply copy a KorAP query URL from your browser and use it here (and in \code{KorAPConnection}) to provide all necessary information for the query.} |
| 18 | |
Marc Kupietz | b125bdd | 2019-09-09 12:05:59 +0200 | [diff] [blame] | 19 | \item{metadataOnly}{boolean that determines whether queries should return only metadata without any snippets. This can also be useful to prevent access rewrites. Note that the default value is TRUE, unless the connection is authorized (currently not possible).} |
Marc Kupietz | b306552 | 2019-09-09 11:34:19 +0200 | [diff] [blame] | 20 | |
Marc Kupietz | cf1caf4 | 2019-09-07 19:19:31 +0200 | [diff] [blame] | 21 | \item{ql}{string to choose the query language} |
| 22 | |
Marc Kupietz | b125bdd | 2019-09-09 12:05:59 +0200 | [diff] [blame] | 23 | \item{fields}{(meta)data fields that will be fetched for every match} |
Marc Kupietz | cf1caf4 | 2019-09-07 19:19:31 +0200 | [diff] [blame] | 24 | } |
Marc Kupietz | 7bce47d | 2019-09-09 11:53:11 +0200 | [diff] [blame] | 25 | \value{ |
Marc Kupietz | 62da2b5 | 2019-09-12 17:43:34 +0200 | [diff] [blame] | 26 | A KorAP query object that, among other information, contains the total number of results in \code{$meta$totalResults}. The resulting object can be used to fetch all query results (with \code{\link{KorAPFetchAll}}) or the next page of results (with \code{\link{KorAPFetchNext}}). |
| 27 | A correspunding URL to be used within a web browser is contained in \code{$webUIRequestUrl} |
| 28 | Please make sure to check \code{$collection$rewrites} to see if any unforseen access rewrites of the query's virtual corpus had to be performed. |
Marc Kupietz | 7bce47d | 2019-09-09 11:53:11 +0200 | [diff] [blame] | 29 | } |
Marc Kupietz | cf1caf4 | 2019-09-07 19:19:31 +0200 | [diff] [blame] | 30 | \description{ |
Marc Kupietz | 62da2b5 | 2019-09-12 17:43:34 +0200 | [diff] [blame] | 31 | Send a query to a KorAP connection. |
Marc Kupietz | cf1caf4 | 2019-09-07 19:19:31 +0200 | [diff] [blame] | 32 | } |
| 33 | \examples{ |
| 34 | q <- KorAPQuery(con, "Ameisenplage") |
| 35 | q <- KorAPQuery(KorAPConnection(), "Ameisenplage") |
| 36 | q <- KorAPQuery(con, KorAPUrl = "https://korap.ids-mannheim.de/?q=Ameise&cq=pubDate+since+2017&ql=poliqarp&cutoff=1") |
| 37 | |
| 38 | } |
| 39 | \references{ |
| 40 | \url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026} |
| 41 | } |