Skip to content

Search API#

Handle#

[source]

get_search_api#

Project.get_search_api()

Get the search api for the project.

Returns

SearchApi: The Search Api handle


Methods#

[source]

SearchApi.feature_search(search_term, offset=0, limit=100)

Search for features. Returns matching features from all feature stores in the project including shared feature stores.

import hopsworks

project = hopsworks.login()

search_api = project.get_search_api()

result = search_api.feature_search("search_term")

# get feature group instance
feature_group = result.features[0].get_feature_group()

# get feature instance
feature = result.features[0].get_feature()
Arguments

  • search_term str: the term to search for.
  • offset int: the number of results to skip (default is 0).
  • limit int: the number of search results to return (default is 100).

Returns

FeatureSearchResult: The results.

Raises

  • ValueError: If the search term is not provided.
  • hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request

[source]

SearchApi.featuregroup_search(search_term, filter_by=None, offset=0, limit=100)

Search for feature group. Returns matching feature groups from all feature stores in the project including shared feature stores.

import hopsworks

project = hopsworks.login()

search_api = project.get_search_api()

result = search_api.featuregroup_search("search_term")

# get feature group instance
featuregroup = result.featuregroups[0].get_feature_group()
Arguments

  • search_term str: the term to search for.
  • filter_by Literal['tag', 'tag_name', 'tag_key', 'tag_value', 'keyword'] | None: filter results by a specific field (default is None).
  • offset int: the number of results to skip (default is 0).
  • limit int: the number of search results to return (default is 100).

Returns

FeatureGroupSearchResult: The results.

Raises

  • ValueError: If the search term is not provided or if the filter_by is not one of the allowed values.
  • hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request

[source]

SearchApi.featurestore_search(search_term, filter_by=None, offset=0, limit=100)

Search for feature groups, feature views, training datasets and features. Returns matching results from all feature stores in the project including shared feature stores.

import hopsworks

project = hopsworks.login()

search_api = project.get_search_api()

result = search_api.featurestore_search("search-term")

# get feature group instance
featuregroup = result.featuregroups[0].get_feature_group()
Arguments

  • search_term str: the term to search for.
  • filter_by Literal['tag', 'tag_name', 'tag_key', 'tag_value', 'keyword'] | None: filter results by a specific field (default is None).
  • offset int: the number of results to skip (default is 0).
  • limit int: the number of search results to return (default is 100).

Returns

FeaturestoreSearchResult: The results.

Raises

  • ValueError: If the search term is not provided or if the filter_by is not one of the allowed values.
  • hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request

[source]

SearchApi.featureview_search(search_term, filter_by=None, offset=0, limit=100)

Search for feature views. Returns matching feature views from all feature stores in the project including shared feature stores.

import hopsworks

project = hopsworks.login()

search_api = project.get_search_api()

result = search_api.featureview_search("search_term")

# get feature view instance
featureview = result.feature_views[0].get_feature_view()
Arguments

  • search_term str: the term to search for.
  • filter_by Literal['tag', 'tag_name', 'tag_key', 'tag_value', 'keyword'] | None: filter results by a specific field (default is None).
  • offset int: the number of results to skip (default is 0).
  • limit int: the number of search results to return (default is 100).

Returns

FeatureViewSearchResult: The results.

Raises

  • ValueError: If the search term is not provided or if the filter_by is not one of the allowed values.
  • hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request

[source]

SearchApi.trainingdataset_search(search_term, filter_by=None, offset=0, limit=100)

Search for training datasets. Returns matching training datasets from all feature stores in the project including shared feature stores.

import hopsworks

project = hopsworks.login()

search_api = project.get_search_api()

result = search_api.trainingdataset_search("search_term")

# get training datasets instance
trainingdataset = result.trainingdatasets[0].get_training_dataset()
Arguments

  • search_term str: the term to search for.
  • filter_by Literal['tag', 'tag_name', 'tag_key', 'tag_value', 'keyword'] | None: filter results by a specific field (default is None).
  • offset int: the number of results to skip (default is 0).
  • limit int: the number of search results to return (default is 100).

Returns

TrainingDatasetSearchResult: The results.

Raises

  • ValueError: If the search term is not provided or if the filter_by is not one of the allowed values.
  • hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request

Properties#

FeaturestoreSearchResult#

[source]

feature_views#

List of FeatureViewResult.


[source]

feature_views_from#

Results from offset.


[source]

feature_views_total#

Total feature views found.


[source]

featuregroups#

List of FeatureGroupResult.


[source]

featuregroups_from#

Results from offset.


[source]

featuregroups_total#

Total feature groups found.


[source]

features#

List of FeatureResult.


[source]

features_from#

Features from offset.


[source]

features_total#

Total features found.


[source]

trainingdatasets#

List of TrainingDatasetResult.


[source]

trainingdatasets_from#

Results from offset.


[source]

trainingdatasets_total#

Total training datasets found.


FeatureGroupSearchResult#

[source]

featuregroups#

List of FeatureGroupResult.


[source]

featuregroups_from#

Result from offset.


[source]

featuregroups_total#

Total feature groups found.


FeatureViewSearchResult#

[source]

feature_views#

List of FeatureViewResult.


[source]

feature_views_from#

Result from offset.


[source]

feature_views_total#

Total feature views found.


TrainingDatasetSearchResult#

[source]

trainingdatasets#

List of TrainingDatasetResult.


[source]

trainingdatasets_from#

Result from offset.


[source]

trainingdatasets_total#

Total training datasets found.


FeatureSearchResult#

[source]

features#

List of FeatureResult.


[source]

features_from#

Result from offset.


[source]

features_total#

Total features found.


FeatureGroupResult#

[source]

get_feature_group#

FeatureGroupResult.get_feature_group()

Get the feature group instance associated with this feature group result.

Returns:

FeatureGroup: The feature group instance.

Raises:

hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request.


FeatureViewResult#

[source]

get_feature_view#

FeatureViewResult.get_feature_view()

Get the feature view instance associated with this feature view result.

Returns:

FeatureView: The feature view instance.

Raises:

hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request.


TrainingDatasetResult#

[source]

get_training_dataset#

TrainingDatasetResult.get_training_dataset()

Get the training dataset instance associated with this training dataset result.

Returns:

TrainingDataset: The training dataset instance.

Raises:

hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request.


FeatureResult#

[source]

get_feature#

FeatureResult.get_feature()

Get the feature instance associated with this feature result.

Returns:

Feature: The feature instance.

Raises:

hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request.


[source]

get_feature_group#

FeatureResult.get_feature_group()

Get the feature group instance associated with this feature.

Returns:

FeatureGroup: The feature group instance.

Raises:

hopsworks.client.exceptions.RestAPIError: If the backend encounters an error when handling the request.