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} |
| 5 | \title{\code{KorAPQuery} perform a query on the KorAP server.} |
| 6 | \usage{ |
Marc Kupietz | b306552 | 2019-09-09 11:34:19 +0200 | [diff] [blame] | 7 | KorAPQuery(con, query, vc = NA, KorAPUrl = NA, metadataOnly = FALSE, |
| 8 | ql = "poliqarp", fields = defaultFields) |
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 | b306552 | 2019-09-09 11:34:19 +0200 | [diff] [blame] | 19 | \item{metadataOnly}{boolean that determines wether queries should return only metadata without any snippets. This can also be useful to prevent access rewrites.} |
| 20 | |
Marc Kupietz | cf1caf4 | 2019-09-07 19:19:31 +0200 | [diff] [blame] | 21 | \item{ql}{string to choose the query language} |
| 22 | |
| 23 | \item{fields}{(meta)data fields that will be fetch for every matcch} |
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{ |
| 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}}). 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. |
| 27 | } |
Marc Kupietz | cf1caf4 | 2019-09-07 19:19:31 +0200 | [diff] [blame] | 28 | \description{ |
| 29 | \code{KorAPQuery} perform a query on the KorAP server. |
| 30 | } |
| 31 | \examples{ |
| 32 | q <- KorAPQuery(con, "Ameisenplage") |
| 33 | q <- KorAPQuery(KorAPConnection(), "Ameisenplage") |
| 34 | q <- KorAPQuery(con, KorAPUrl = "https://korap.ids-mannheim.de/?q=Ameise&cq=pubDate+since+2017&ql=poliqarp&cutoff=1") |
| 35 | |
| 36 | } |
| 37 | \references{ |
| 38 | \url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026} |
| 39 | } |