Skip to content

Search Listings

datazone_search_listings R Documentation

Searches listings in Amazon DataZone

Description

Searches listings in Amazon DataZone.

SearchListings is a powerful capability that enables users to discover and explore published assets and data products across their organization. It provides both basic and advanced search functionality, allowing users to find resources based on names, descriptions, metadata, and other attributes. SearchListings also supports filtering using various criteria such as creation date, owner, or status. This API is essential for making the wealth of data resources in an organization discoverable and usable, helping users find the right data for their needs quickly and efficiently.

SearchListings returns results in a paginated format. When the result set is large, the response will include a nextToken, which can be used to retrieve the next page of results.

The SearchListings API gives users flexibility in specifying what kind of search is run.

To run a standard free-text search, the searchText parameter must be supplied. By default, all searchable fields are indexed for semantic search and will return semantic matches for SearchListings queries. To prevent semantic search indexing for a custom form attribute, see the CreateFormType API documentation. To run a lexical search query, enclose the query with double quotes (""). This will disable semantic search even for fields that have semantic search enabled and will only return results that contain the keywords wrapped by double quotes (order of tokens in the query is not enforced). Free-text search is supported for all attributes annotated with @amazon.datazone#searchable.

To run a filtered search, provide filter clause using the filters parameter. To filter on glossary terms, use the special attribute ⁠__DataZoneGlossaryTerms⁠. To filter on an indexed numeric attribute (i.e., a numeric attribute annotated with ⁠@amazon.datazone#sortable⁠), provide a filter using the intValue parameter. The filters parameter can also be used to run more advanced free-text searches that target specific attributes (attributes must be annotated with ⁠@amazon.datazone#searchable⁠ for free-text search). Create/update timestamp filtering is supported using the special creationTime/lastUpdatedTime attributes. Filter types can be mixed and matched to power complex queries.

To find out whether an attribute has been annotated and indexed for a given search type, use the GetFormType API to retrieve the form containing the attribute.

Usage

datazone_search_listings(domainIdentifier, searchText, searchIn,
  maxResults, nextToken, filters, aggregations, sort,
  additionalAttributes)

Arguments

domainIdentifier

[required] The identifier of the domain in which to search listings.

searchText

Specifies the text for which to search.

searchIn

The details of the search.

maxResults

The maximum number of results to return in a single call to search_listings. When the number of results to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to search_listings to list the next set of results.

nextToken

When the number of results is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of results, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to search_listings to list the next set of results.

filters

Specifies the filters for the search of listings.

aggregations

Enables you to specify one or more attributes to compute and return counts grouped by field values.

sort

Specifies the way for sorting the search results.

additionalAttributes

Specifies additional attributes for the search.

Value

A list with the following syntax:

list(
  items = list(
    list(
      assetListing = list(
        listingId = "string",
        listingRevision = "string",
        name = "string",
        entityId = "string",
        entityRevision = "string",
        entityType = "string",
        description = "string",
        createdAt = as.POSIXct(
          "2015-01-01"
        ),
        listingCreatedBy = "string",
        listingUpdatedBy = "string",
        glossaryTerms = list(
          list(
            name = "string",
            shortDescription = "string"
          )
        ),
        governedGlossaryTerms = list(
          list(
            name = "string",
            shortDescription = "string"
          )
        ),
        owningProjectId = "string",
        additionalAttributes = list(
          forms = "string",
          matchRationale = list(
            list(
              textMatches = list(
                list(
                  attribute = "string",
                  text = "string",
                  matchOffsets = list(
                    list(
                      startOffset = 123,
                      endOffset = 123
                    )
                  )
                )
              )
            )
          ),
          latestTimeSeriesDataPointForms = list(
            list(
              formName = "string",
              typeIdentifier = "string",
              typeRevision = "string",
              timestamp = as.POSIXct(
                "2015-01-01"
              ),
              contentSummary = "string",
              id = "string"
            )
          )
        )
      ),
      dataProductListing = list(
        listingId = "string",
        listingRevision = "string",
        name = "string",
        entityId = "string",
        entityRevision = "string",
        description = "string",
        createdAt = as.POSIXct(
          "2015-01-01"
        ),
        listingCreatedBy = "string",
        listingUpdatedBy = "string",
        glossaryTerms = list(
          list(
            name = "string",
            shortDescription = "string"
          )
        ),
        owningProjectId = "string",
        additionalAttributes = list(
          forms = "string",
          matchRationale = list(
            list(
              textMatches = list(
                list(
                  attribute = "string",
                  text = "string",
                  matchOffsets = list(
                    list(
                      startOffset = 123,
                      endOffset = 123
                    )
                  )
                )
              )
            )
          )
        ),
        items = list(
          list(
            listingId = "string",
            listingRevision = "string",
            glossaryTerms = list(
              list(
                name = "string",
                shortDescription = "string"
              )
            )
          )
        )
      )
    )
  ),
  nextToken = "string",
  totalMatchCount = 123,
  aggregates = list(
    list(
      attribute = "string",
      displayValue = "string",
      items = list(
        list(
          value = "string",
          count = 123,
          displayValue = "string"
        )
      )
    )
  )
)

Request syntax

svc$search_listings(
  domainIdentifier = "string",
  searchText = "string",
  searchIn = list(
    list(
      attribute = "string"
    )
  ),
  maxResults = 123,
  nextToken = "string",
  filters = list(
    filter = list(
      attribute = "string",
      value = "string",
      intValue = 123,
      operator = "EQ"|"LE"|"LT"|"GE"|"GT"|"TEXT_SEARCH"
    ),
    and = list(
      list()
    ),
    or = list(
      list()
    )
  ),
  aggregations = list(
    list(
      attribute = "string",
      displayValue = "string"
    )
  ),
  sort = list(
    attribute = "string",
    order = "ASCENDING"|"DESCENDING"
  ),
  additionalAttributes = list(
    "FORMS"|"TIME_SERIES_DATA_POINT_FORMS"|"TEXT_MATCH_RATIONALE"
  )
)