For more information on the NBA object model, please refer to the official NBA documentation at https://docs.biodiversitydata.nl and the NBA model and endpoints reference at https://docs.biodiversitydata.nl/endpoints-reference.
# QuerySpec$new()
R6 class
Model class for QuerySpec objects. A QuerySpec object enables you to specify a query for the NBA. It contains the following properties, each covering a different aspect of the query: * conditions: The search criteria a.k.a. query conditions. Only documents that satisfy all search criteria or at least one (depending on the logicalOperator are returned.
constantScore
logical If true, no relevance scores will be calculated for the returned documents. By default Elasticsearch not only determines whether a document matches your search criteria, but also how well it matches them, expressed as a so-called relevance score. If you are not interested in relevance scores, set constantScore to true, as there is some performance overhead associated with calculating relevance scores.
fields
list(character) The fields to be returned. Specimen, Taxon and MultiMediaObject documents are large documents containing lots of fields. If you are only interested in a few fields, use the fields property to specify them.
conditions
list(QueryCondition) List of QueryCondition objetcs
logicalOperator
character (AND/OR) Specifies whether a document must satisfy all search criteria or just one in order to be returned.
sortFields
list(SortField) Specifies the field(s) on which to sort the documents.
from
integer The offset in the result set from which to return the documents.
size
integer The number of documents to return.
$new()
Constructor QuerySpec object.
$fromList(QuerySpecList)
Create QuerySpec object from list.
$toList()
Get list representation of QuerySpec.
fromJSONString(QuerySpecJson)
Create QuerySpec object from JSON.
toJSONString(pretty=TRUE)
Get JSON representation of QuerySpec.