SearchQuery-class {MacrobondAPI}R Documentation

SearchQuery class

Description

Use this class to set up a request for searching in the database.

Objects from the Class

Objects are created by calling CreateSearchQuery.

Methods

getIncludeDiscontinued

signature(object = "SearchQuery"): Get if the search query will include discontinued entities.

setIncludeDiscontinued

signature(object = "SearchQuery", include = "logical"): Set if the search query will include discontinued entities.

getSearchText

signature(object = "SearchQuery"): Get the free text search text.

setSearchText

signature(object = "SearchQuery", text = "character"): Set the free text search text.

setEntityTypeFilter

signature(object = "SearchQuery", entities = "character"): Set the entitity type to include in the search.

setEntityTypeFilter

signature(object = "SearchQuery", entities = "list"): Set the entitity types to include in the search.

addAttributeFilter

signature(m = "SearchQuery", attribute = "character"): Add an attribute to be included in the search.

addAttributeFilter

signature(m = "SearchQuery", attribute = "list"): Add multiple attributes to be included in the search.

addAttributeFilter

signature(m = "SearchQuery", attribute = "character", include = "logical"): Add an attribute to be included or excluded in the search.

addAttributeFilter

signature(m = "SearchQuery", attribute = "list", include = "logical"): Add multiple attributes to be included or excluded in the search.

addAttributeValueFilter

signature(m = "SearchQuery", attribute = "character", value = "character"): Add an attribute value filter to be included in the search.

addAttributeValueFilter

signature(m = "SearchQuery", attribute = "character", value = "list"): Add multiple attribute value filters to be included in the search.

addAttributeValueFilter

signature(m = "SearchQuery", attribute = "character", value = "character", include = "logical"): Add an attribute value filter to be included or excluded in the search.

addAttributeValueFilter

signature(m = "SearchQuery", attribute = "character", value = "list", include = "logical"): Add multiple attribute value filters to be included or excluded in the search.

Note

Attribute filters and value filters are using OR if added as a list at once and AND if added seperately by multiple calls to addAttributeFilter/addAttributeValueFilter.

See Also

Search CreateSearchQuery SearchResult

Examples

# Search for time series that are the key GDP series for the regions US, GB and DE.
query <- CreateSearchQuery()
setEntityTypeFilter(query, "TimeSeries")
addAttributeValueFilter(query, "RegionKey", "gdp_total")
addAttributeValueFilter(query, "Region", c("us", "gb", "de"))
searchResult <- Search(query)

[Package MacrobondAPI version 1.1-5 Index]