Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class SearchResultItem.
Search result contains asset name and corresponding time ranges.
Generated from protobuf message google.cloud.visionai.v1.SearchResultItem
Namespace
Google \ Cloud \ VisionAI \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ asset
string
The resource name of the asset. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}
↳ segments
array< Partition\TemporalPartition
>
The matched asset segments. Deprecated: please use singular segment
field.
↳ segment
↳ relevance
float
Available to IMAGE corpus types. Relevance of this SearchResultItem
to user search query (text query or image query). By default this represents cosine similarity between the query and the retrieved media content. The value is in the range of [-1, 1]. Note that search ranking is not only decided by this relevance score, but also other factors such as the match of annotations.
↳ requested_annotations
array< Annotation
>
Search result annotations specified by result_annotation_keys in search request.
↳ annotation_matching_results
array< AnnotationMatchingResult
>
Criteria or facet-selection based annotation matching results associated to this search result item. Only contains results for criteria or facet_selections with fetch_matched_annotations=true.
getAsset
The resource name of the asset.
Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}
string
setAsset
The resource name of the asset.
Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}
var
string
$this
getSegments
The matched asset segments.
Deprecated: please use singular segment
field.
setSegments
The matched asset segments.
Deprecated: please use singular segment
field.
$this
getSegment
The matched asset segment.
hasSegment
clearSegment
setSegment
The matched asset segment.
$this
getRelevance
Available to IMAGE corpus types.
Relevance of this SearchResultItem
to user search query (text query or
image query).
By default this represents cosine similarity between the query and the
retrieved media content. The value is in the range of [-1, 1].
Note that search ranking is not only decided by this relevance score, but
also other factors such as the match of annotations.
float
setRelevance
Available to IMAGE corpus types.
Relevance of this SearchResultItem
to user search query (text query or
image query).
By default this represents cosine similarity between the query and the
retrieved media content. The value is in the range of [-1, 1].
Note that search ranking is not only decided by this relevance score, but
also other factors such as the match of annotations.
var
float
$this
getRequestedAnnotations
Search result annotations specified by result_annotation_keys in search request.
setRequestedAnnotations
Search result annotations specified by result_annotation_keys in search request.
$this
getAnnotationMatchingResults
Criteria or facet-selection based annotation matching results associated to this search result item. Only contains results for criteria or facet_selections with fetch_matched_annotations=true.
setAnnotationMatchingResults
Criteria or facet-selection based annotation matching results associated to this search result item. Only contains results for criteria or facet_selections with fetch_matched_annotations=true.
$this

