Search API#
Handle#
get_search_api#
Project.get_search_api()
Get the search api for the project.
Returns
SearchApi: The Search Api handle
Methods#
feature_search#
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()
- 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
featuregroup_search#
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()
- 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
featurestore_search#
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()
- 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
featureview_search#
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()
- 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
trainingdataset_search#
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()
- 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#
feature_views#
List of FeatureViewResult.
feature_views_from#
Results from offset.
feature_views_total#
Total feature views found.
featuregroups#
List of FeatureGroupResult.
featuregroups_from#
Results from offset.
featuregroups_total#
Total feature groups found.
features#
List of FeatureResult.
features_from#
Features from offset.
features_total#
Total features found.
trainingdatasets#
List of TrainingDatasetResult.
trainingdatasets_from#
Results from offset.
trainingdatasets_total#
Total training datasets found.
FeatureGroupSearchResult#
featuregroups#
List of FeatureGroupResult.
featuregroups_from#
Result from offset.
featuregroups_total#
Total feature groups found.
FeatureViewSearchResult#
feature_views#
List of FeatureViewResult.
feature_views_from#
Result from offset.
feature_views_total#
Total feature views found.
TrainingDatasetSearchResult#
trainingdatasets#
List of TrainingDatasetResult.
trainingdatasets_from#
Result from offset.
trainingdatasets_total#
Total training datasets found.
FeatureSearchResult#
features#
List of FeatureResult.
features_from#
Result from offset.
features_total#
Total features found.
FeatureGroupResult#
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#
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#
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#
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.
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.