blob: b884d324ac00e812ca8dfdf99f2a47951a9d92a8 [file] [log] [blame]
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/KorAPQuery.R
\name{KorAPQuery}
\alias{KorAPQuery}
\title{\code{KorAPQuery} perform a query on the KorAP server.}
\usage{
KorAPQuery(con, query, vc = NA, KorAPUrl = NA, metadataOnly = FALSE,
ql = "poliqarp", fields = defaultFields)
}
\arguments{
\item{con}{object obtained from \code{\link{KorAPConnection}}, that contains all necessary connection information}
\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}}
\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.}
\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.}
\item{metadataOnly}{boolean that determines wether queries should return only metadata without any snippets. This can also be useful to prevent access rewrites.}
\item{ql}{string to choose the query language}
\item{fields}{(meta)data fields that will be fetch for every matcch}
}
\value{
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.
}
\description{
\code{KorAPQuery} perform a query on the KorAP server.
}
\examples{
q <- KorAPQuery(con, "Ameisenplage")
q <- KorAPQuery(KorAPConnection(), "Ameisenplage")
q <- KorAPQuery(con, KorAPUrl = "https://korap.ids-mannheim.de/?q=Ameise&cq=pubDate+since+2017&ql=poliqarp&cutoff=1")
}
\references{
\url{https://ids-pub.bsz-bw.de/frontdoor/index/index/docId/9026}
}