Methods
# aggregateBy(field)
Set the field by which to aggregate results if aggregation is requested
Parameters:
Name | Type | Description |
---|---|---|
field |
string | The OSDU record field by which to aggregate results |
# build() → {Object}
Construct the query request body based on the attributes set
The JSON object that is passed into the body of the OSDU API Search request
# kind(kind)
Set the OSDU kind to filter the scope of the search.
- Accepts wildcards
*
within kind sections. (I.E.*:osdu:*:0.2.0
)
Parameters:
Name | Type | Description |
---|---|---|
kind |
string | The OSDU kind with which to filter the search |
# limit(limit)
Set the maximum limit of records to return within the query results
- In paged queries, this sets the page size
Parameters:
Name | Type | Description |
---|---|---|
limit |
number | The maximum number of records (positive integer) to return |
# offset(offset)
Set the offset value representing how many records should be skipped before collecting records to return
Parameters:
Name | Type | Description |
---|---|---|
offset |
number | The number of records (positive integer) to skip before collecting records to return |
- Deprecated:
- Recommended to use the paged query rather than attempting to page via offset
# query(query_expression)
Set the OSDU compliant query expression to narrow the search results
- OSDU query syntax can be found in OSDU documentation here
- Note that the passed in expression must be an instance of the Osdu Query Expression class
Parameters:
Name | Type | Description |
---|---|---|
query_expression |
OsduQueryExpression | The query expression used to narrow search results based on the available OSDU data |
# returnedFields(returned_fields)
Set the fields to include on the returned records
- Will include these fields where found, but does not guarantee that all records will contain these fields
Parameters:
Name | Type | Description |
---|---|---|
returned_fields |
Array.<sring> |
# sort(fields, order)
Set the sort order of results prior to paging
Parameters:
Name | Type | Description |
---|---|---|
fields |
Array.<string> | The fields by which to order the results |
order |
Array.<string> | The order (Ascending/Descending) in which to sort the results on each field. Only accepts "ASC" and "DESC" |
# spacialFilter(spacial_filter)
Set the spacial filter on the OSDU query
- Not yet supported.
Parameters:
Name | Type | Description |
---|---|---|
spacial_filter |
undefined |
Error