pg_search_es | R Documentation |
Search the Pangaea database with Elasticsearch
pg_search_es( query = NULL, size = 10, from = NULL, source = NULL, df = NULL, analyzer = NULL, default_operator = NULL, explain = NULL, sort = NULL, track_scores = NULL, timeout = NULL, terminate_after = NULL, search_type = NULL, lowercase_expanded_terms = NULL, analyze_wildcard = NULL, version = FALSE, ... )
query |
(character) Query terms.. |
size |
(character) The number of hits to return. Pass in as a
character string to avoid problems with large number conversion to
scientific notation. Default: 10. The default maximum is 10,000 - however,
you can change this default maximum by changing the
|
from |
(character) The starting from index of the hits to return. Pass in as a character string to avoid problems with large number conversion to scientific notation. Default: 0 |
source |
(character) character vector of fields to return |
df |
(character) The default field to use when no field prefix is defined within the query. |
analyzer |
(character) The analyzer name to be used when analyzing the query string. |
default_operator |
(character) The default operator to be used, can be
|
explain |
(logical) For each hit, contain an explanation of how
scoring of the hits was computed. Default: |
sort |
(character) Sorting to perform. Can either be in the form of
fieldName, or |
track_scores |
(logical) When sorting, set to |
timeout |
(numeric) A search timeout, bounding the search request to be executed within the specified time value and bail with the hits accumulated up to that point when expired. Default: no timeout. |
terminate_after |
(numeric) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. If set, the response will have a boolean field terminated_early to indicate whether the query execution has actually terminated_early. Default: no terminate_after |
search_type |
(character) The type of the search operation to perform.
Can be |
lowercase_expanded_terms |
(logical) Should terms be automatically
lowercased or not. Default: |
analyze_wildcard |
(logical) Should wildcard and prefix queries be
analyzed or not. Default: |
version |
(logical) Print the document version with each document. |
... |
Curl options passed on to crul::verb-GET |
An interface to Pangaea's Elasticsearch query interface. You can also just use elastic package to interact with it. The base URL is https://ws.pangaea.de/es/pangaea/panmd/_search
tibble/data.frame, empty if no results
pg_search()
## Not run: (res <- pg_search_es()) attributes(res) attr(res, "total") attr(res, "max_score") pg_search_es(query = 'water', source = c('parentURI', 'minElevation')) pg_search_es(query = 'water', size = 3) pg_search_es(query = 'water', size = 3, from = 10) pg_search_es(query = 'water sky', default_operator = "OR") pg_search_es(query = 'water sky', default_operator = "AND") pg_search_es(query = 'water', sort = "minElevation") pg_search_es(query = 'water', sort = "minElevation:desc") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.