Searching
Queries
Search queries in Mixpeek allow you to search across multiple modalities (text, images, videos) simultaneously using an array of query objects.
Understanding Queries
Query Types
-
Text Queries
- Natural language text
- Keywords and phrases
- Semantic understanding
- Language support
-
URL Queries
- Image URLs
- Video URLs
- Document URLs
- Web content
-
Vector Indexes
text
: Text embeddingsimage
: Image embeddingsvideo
: Video embeddingsmultimodal
: Cross-modal embeddings
Query Structure
Basic Query
Multi-Modal Query
Query Parameters
Required Fields
Field | Type | Description |
---|---|---|
type | string | Query type (“text” or “url”) |
value | string | The query content |
vector_index | string | Index to search against |
Optional Fields
Field | Type | Description |
---|---|---|
settings | object | Query-specific settings |
weights | object | Importance of each query |
threshold | number | Minimum relevance score |
Result Combination
Reciprocal Rank Fusion (RRF)
When multiple queries are provided, results are combined using RRF:
- Each query runs independently
- Results are ranked within each query
- RRF score calculated for each item
- Final results ordered by combined RRF score
RRF Formula
Common Use Cases
Visual Search
- Similar Image Search
Hybrid Search
- Image + Text
Limitations
Technical Constraints
-
Query Limits
- Maximum 5 queries per request
- URL size restrictions
- Text length limits
- Response time constraints
-
URL Requirements
- Must be publicly accessible
- Supported formats only
- Size limitations
- Valid URL structure
-
Processing Limits
- Timeout thresholds
- Resource constraints
- Rate limits
- Concurrent query limits
Best Practices
Query Optimization
-
Query Selection
- Choose appropriate types
- Use relevant vector indexes
- Balance query count
- Consider performance
-
Performance Tips
- Limit number of queries
- Optimize query content
- Use appropriate indexes
- Monitor response times
Common Patterns
-
Progressive Enhancement
- Start with single modality
- Add complementary queries
- Monitor result quality
- Adjust as needed
-
Result Refinement
- Use specific queries
- Combine modalities effectively
- Apply appropriate weights
- Set relevant thresholds
Error Handling
Common Issues
-
Invalid Queries
- Unsupported types
- Invalid URLs
- Missing fields
- Wrong index types
-
Performance Problems
- Too many queries
- Large content size
- Slow processing
- Timeout issues
Resolution Steps
-
Query Validation
- Check query types
- Validate URLs
- Verify indexes
- Test query combinations
-
Performance Optimization
- Reduce query count
- Optimize content size
- Use appropriate indexes
- Monitor processing time