search.Definition object
This object creates a definition of information about the data for search.
Module
refinitiv.data.content.search
Syntax
search.Definition(
query,
view,
filter,
order_by,
boost,
select,
top,
skip,
group_by,
group_count,
navigators,
features,
scope,
terms,
extended_params
)
Parameters
Value | Description | Data type | Optional | Default value |
---|---|---|---|---|
query | Keyword argument for view. One of the two parameters (the other being filter ) which restricts the set of documents matched. |
str | Yes | None |
view | Identifies a subset of the overall search data universe. | SearchViews | Yes | Views.SEARCH_ALL |
filter | Filter parameters for structured programmatic restrictions. | str | Yes | None |
order_by | Defines the order in which matching documents should be returned. | str | Yes | None |
boost | Supports exactly the same predicate expression syntax as filter, but just applies a large scoring boost to documents it matches, which will almost always guarantee that they appear at the top of the results. | str | Yes | None |
select | A comma-separated list of the properties of a document to be returned in the response. | str | Yes | None |
top | The maximum number of documents to retrieve. Must be non-negative. | int | Yes | 10 |
skip | The number of documents to skip in the sorted result set before returning the next bunch of documents defining in the top section of the definition (see top section above). |
int | Yes | 0 |
group_by | Name a single property that can be grouped. Returned documents are grouped into buckets based on their value for this property. | str | Yes | None |
group_count | When supplied in combination with group_by, sets the maximum number of documents to be returned per bucket. | int | Yes | 3 |
navigators | Name one or more properties, separated by commas, each of which must be Navigable. | str | Yes | None |
features | The list of feature names which should be enabled for this request. | str | Yes | None |
scope | Name of a single symbolic property. Determines what Terms will be checked against. | str | Yes | None |
terms | A comma-separated list of symbol values, to be interpreted according to the Scope parameter. | str | Yes | None |
extended_params | Additional parameters to apply to the request. | dict | Yes | None |
Returned value
search.Definition object
Usage
The following example demonstrates how to create a search definition for IBM:
from refinitiv.data.content import search
definition = search.Definition("IBM")