blob: b884d324ac00e812ca8dfdf99f2a47951a9d92a8 [file] [log] [blame]
Marc Kupietzcf1caf42019-09-07 19:19:31 +02001% 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 Kupietzb3065522019-09-09 11:34:19 +02007KorAPQuery(con, query, vc = NA, KorAPUrl = NA, metadataOnly = FALSE,
8 ql = "poliqarp", fields = defaultFields)
Marc Kupietzcf1caf42019-09-07 19:19:31 +02009}
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 Kupietzb3065522019-09-09 11:34:19 +020019\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 Kupietzcf1caf42019-09-07 19:19:31 +020021\item{ql}{string to choose the query language}
22
23\item{fields}{(meta)data fields that will be fetch for every matcch}
Marc Kupietzcf1caf42019-09-07 19:19:31 +020024}
Marc Kupietz7bce47d2019-09-09 11:53:11 +020025\value{
26A 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 Kupietzcf1caf42019-09-07 19:19:31 +020028\description{
29\code{KorAPQuery} perform a query on the KorAP server.
30}
31\examples{
32q <- KorAPQuery(con, "Ameisenplage")
33q <- KorAPQuery(KorAPConnection(), "Ameisenplage")
34q <- 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}