> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudglue.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Search

> Search across video files and segments to find relevant content

## What is Search?

Search in Cloudglue enables you to find relevant video content across your collections using natural language queries. Whether you're looking for specific topics discussed in videos or particular moments within video segments, Search provides powerful semantic search capabilities to help you discover exactly what you need.

Search works with your [Media Description Collections](/core-concepts/media-description-collection) to find content based on speech transcripts, visual descriptions, and scene text. This makes it easy to locate specific information across large video libraries without having to manually review each video.

## Search Scopes

Cloudglue offers two distinct search scopes, each optimized for different use cases:

### File-Level Search

File-level search helps you find entire videos that are relevant to your query. This scope is perfect when you want to discover which videos in your collection contain information about a particular topic.

**Key Features:**

* Searches across entire video summaries and titles
* Returns whole video files as results
* Ideal for content discovery and organization
* Requires collections with `enable_summary: true` in the describe configuration

**Use Cases:**

* "Find all videos about machine learning"
* "Which videos discuss quarterly earnings?"
* "Show me cooking videos featuring Italian cuisine"

### Segment-Level Search

Segment-level search pinpoints specific moments within videos where relevant content appears. This scope is ideal when you need to find exact timestamps where particular topics are discussed or events occur.

**Key Features:**

* Searches within individual video segments
* Returns specific time ranges with precise timestamps
* Includes relevant speech, visual descriptions, and scene text
* Provides detailed context for each result

**Use Cases:**

* "When did the speaker mention the new product launch?"
* "Find moments where charts or graphs are shown"
* "Locate instances where specific technical terms are discussed"

## Search Capabilities

### Semantic Understanding

Search uses advanced language models to understand the meaning behind your queries, not just exact keyword matches. This means you can search using natural language and find semantically related content even when different words are used.

**Examples:**

* Searching for "revenue growth" will also find content about "income increase" or "profit expansion"
* A query about "customer satisfaction" can discover discussions about "user happiness" or "client feedback"

### Multi-Modal Content

Search works across all types of multimodal media description data:

* **Speech Transcripts**: Find spoken words and conversations
* **Visual Scene Descriptions**: Locate visual elements and actions
* **Scene Text**: Discover text that appears on screen

### Advanced Filtering

Enhance your searches with powerful filtering options:

* **Metadata Filters**: Filter by custom metadata fields you've added to your files
* **Video Properties**: Filter by duration, audio presence, file size, and more
* **File Attributes**: Filter by filename, creation date, or file ID
* **Multiple Criteria**: Combine multiple filters for precise results

## How Search Works

### Requirements

To use Search, you need:

1. **Media Description Collections**: Search only works with collections created with `collection_type: 'media-descriptions'`
2. **Processed Content**: Videos must be fully processed with media descriptions complete
3. **Summary Configuration**: For file-level search, collections must have `enable_summary: true`

### Search Process

1. **Query Processing**: Your natural language query is analyzed to understand intent and context
2. **Content Matching**: The system searches across relevant media description data using semantic similarity
3. **Ranking**: Results are ranked by relevance score (0-1, with higher scores indicating better matches)
4. **Filtering**: Any specified filters are applied to narrow down results
5. **Response**: Results are returned with detailed context and metadata

## Search Results

### File Search Results

When performing file-level searches, you receive:

* **File Information**: ID, filename, and collection details
* **Generated Content**: AI-generated title and summary
* **Relevance Score**: Confidence score for the match quality
* **Metadata**: Any custom metadata associated with the file

### Segment Search Results

For segment-level searches, results include:

* **Timing Information**: Precise start and end timestamps
* **Content Context**: Relevant speech, visual descriptions, and scene text
* **File Details**: Information about the source video
* **Relevance Score**: Match quality assessment
* **Segment ID**: Unique identifier for the specific segment

## Practical Applications

### Content Management

* **Video Library Organization**: Quickly categorize and tag large video collections
* **Duplicate Detection**: Find similar content across different videos
* **Content Auditing**: Locate videos containing specific topics or compliance-related content

### Research and Analysis

* **Interview Analysis**: Find specific topics or quotes across multiple interview videos
* **Market Research**: Locate customer feedback or product mentions
* **Educational Content**: Find explanations of particular concepts across training videos

### Media Production

* **B-Roll Discovery**: Find specific visual content for editing projects
* **Fact Checking**: Locate original sources for claims or statements
* **Content Repurposing**: Identify segments suitable for creating clips or highlights

## Getting Started

To start using Search:

1. **Create a Media Description Collection**: Set up a collection wit media description settings appropriate to your use case
2. **Add Videos**: Upload or add videos to your collection
3. **Wait for Processing**: Ensure all videos are fully described
4. **Perform Searches**: Use the [Search API](/api-reference/endpoint/search/post) to find content

<Tip>
  For file-level search capabilities, make sure to set `enable_summary: true`
  when creating your Media Description Collection.
</Tip>

## Best Practices

### Query Optimization

* **Be Specific**: More detailed queries generally yield better results
* **Use Natural Language**: Write queries as you would ask a person
* **Include Context**: Add relevant context to help disambiguate your intent

### Collection Setup

* **Enable Summaries**: Include summary generation for file-level search capabilities
* **Media Description**: Enable visual descriptions and scene text for comprehensive search coverage
* **Consistent Metadata**: Use standardized metadata fields for effective filtering

### Result Management

* **Use Relevance Scores**: Higher scores indicate better matches
* **Apply Filters**: Narrow down results using metadata and file property filters
* **Combine Scopes**: Use both file and segment search for comprehensive discovery

## Limitations

* **Collection Type**: Only works with Media Description Collections
* **Processing Dependency**: Videos must be fully processed before they become searchable
* **Summary Requirement**: File-level search requires summary generation to be enabled
* **Language Support**: Search quality depends on the language and clarity of video content

## Next Steps

To learn more about implementing search in your applications:

1. **Explore the API**: Check out the [Search API documentation](/api-reference/endpoint/search/post)
