# SearchResultItem

- [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/SearchResultItem#SCHEMA_REPRESENTATION)
- [AnnotationMatchingResult](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/SearchResultItem#AnnotationMatchingResult)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/SearchResultItem#AnnotationMatchingResult.SCHEMA_REPRESENTATION)

Search result contains asset name and corresponding time ranges.

| JSON representation |
|---|
| ``` { "asset": string, "segments": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`) } ], "segment": { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`) }, "relevance": number, "requestedAnnotations": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#Annotation`) } ], "annotationMatchingResults": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/SearchResultItem#AnnotationMatchingResult`) } ] } ``` |

| Fields ||
|---|---|
| `asset` | `string` The resource name of the asset. Form: 'projects/{project_number}/locations/{locationId}/corpora/{corpus_id}/assets/{assetId}' |
| `segments[] (deprecated)` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`)`` > [!WARNING] > This item is deprecated! The matched asset segments. Deprecated: please use singular `segment` field. |
| `segment` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#TemporalPartition`)`` The matched asset segment. |
| `relevance` | `number` Relevance of this `SearchResultItem` to user search request. Currently available only in Image Warehouse, and by default represents cosine similarity. In the future can be other measures such as "dot product" or "topicality" requested in the search request. |
| `requestedAnnotations[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#Annotation`)`` Search result annotations specified by resultAnnotationKeys in search request. |
| `annotationMatchingResults[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/SearchResultItem#AnnotationMatchingResult`)`` Criteria or facet-selection based annotation matching results associated to this search result item. Only contains results for criteria or facetSelections with fetchMatchedAnnotations=true. |

## AnnotationMatchingResult

Stores the criteria-annotation matching results for each search result item.

| JSON representation |
|---|
| ``` { "criteria": { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/Criteria`) }, "matchedAnnotations": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#Annotation`) } ], "status": { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Status`) } } ``` |

| Fields ||
|---|---|
| `criteria` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/Criteria`)`` The criteria used for matching. It can be an input search criteria or a criteria converted from a facet selection. |
| `matchedAnnotations[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets.annotations#Annotation`)`` Matched annotations for the criteria. |
| `status` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Status`)`` Status of the match result. Possible values: FAILED_PRECONDITION - the criteria is not eligible for match. OK - matching is performed. |