Nothing
#' @title Highlighting search
#'
#' @description Returns only highlight items
#'
#' @export
#' @template high
#' @param conn A solrium connection object, see [SolrClient]
#' @param params (list) a named list of parameters, results in a GET request
#' as long as no body parameters given
#' @param body (list) a named list of parameters, if given a POST request
#' will be performed
#' @return XML, JSON, a list, or data.frame
#' @seealso [solr_search()], [solr_facet()]
#' @references See https://lucene.apache.org/solr/guide/8_2/highlighting.html
#' for more information on highlighting.
#' @examples \dontrun{
#' # connect
#' (conn <- SolrClient$new(host = "api.plos.org", path = "search", port = NULL))
#'
#' # highlight search
#' solr_highlight(conn, params = list(q='alcohol', hl.fl = 'abstract', rows=10),
#' parsetype = "list")
#' solr_highlight(conn, params = list(q='alcohol', hl.fl = c('abstract','title'),
#' rows=3), parsetype = "list")
#'
#' # Raw data back
#' ## json
#' solr_highlight(conn, params = list(q='alcohol', hl.fl = 'abstract', rows=10),
#' raw=TRUE)
#' ## xml
#' solr_highlight(conn, params = list(q='alcohol', hl.fl = 'abstract', rows=10,
#' wt='xml'), raw=TRUE)
#' ## parse after getting data back
#' out <- solr_highlight(conn, params = list(q='theoretical math',
#' hl.fl = c('abstract','title'), hl.fragsize=30, rows=10, wt='xml'),
#' raw=TRUE)
#' solr_parse(out, parsetype='list')
#' }
solr_highlight <- function(conn, name = NULL, params = NULL, body = NULL,
callopts=list(), raw=FALSE, parsetype='df', progress = NULL, ...) {
conn$highlight(name = name, params = params, body = body,
callopts = callopts, raw = raw, parsetype = parsetype,
progress = progress, ...)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.