Searching
Grouping
Grouping allows you to organize search results into logical clusters based on common fields, making it easier to analyze and present related content together.
Understanding Grouping
Key Concepts
-
Group Fields
- Asset ID grouping (default)
- Metadata field grouping
- Feature type grouping
- Custom field grouping
-
Group Properties
- Maximum features per group
- Internal group sorting
- Group metadata
- Group statistics
Group Configuration
Basic Structure
Configuration Options
-
Group Field Selection
- Must be an indexed field
- Supports dot notation for nested fields
- Limited to predefined grouping fields
- Contact support to add custom grouping fields
-
Group Size Control
- Default: 10 features per group
- Maximum: 50 features per group
- Configurable via max_features
- Affects performance and memory usage
-
Group Sorting
- Sort by any indexed field
- Ascending or descending order
- Supports metadata fields
- Maintains relevance within groups
Common Use Cases
Content Organization
-
Document Groups
- Group pages from same document
- Group sections by topic
- Group by document type
- Group by author or source
-
Media Groups
- Group frames from same video
- Group images by event
- Group by visual similarity
- Group by timestamp
-
Feature Groups
- Group by feature type
- Group by confidence score
- Group by extraction method
- Group by processing status
Limitations
Technical Constraints
-
Field Restrictions
- Only predefined fields supported
- No dynamic field grouping
- No computed field grouping
- Limited nested field support
-
Size Limitations
- Maximum groups per request
- Maximum features per group
- Memory usage constraints
- Response size limits
-
Functionality Restrictions
- No cross-group operations
- No group aggregations
- No group-level filtering
- Not compatible with offset pagination
Performance Considerations
-
Resource Usage
- Groups consume additional memory
- Sorting within groups adds overhead
- Large group sizes impact performance
- Complex group fields slow response time
-
Scaling Factors
- Number of groups
- Features per group
- Group field complexity
- Sort field complexity
Best Practices
Optimization Tips
-
Group Selection
- Choose meaningful group fields
- Limit group sizes appropriately
- Use efficient sort fields
- Consider result set size
-
Performance Tuning
- Monitor group counts
- Optimize max_features
- Use indexed sort fields
- Cache frequent group results
Common Patterns
-
Hierarchical Grouping
- Primary grouping by asset
- Secondary sorting within groups
- Maintain relevance ordering
- Preserve feature relationships
-
Result Presentation
- Display group summaries
- Show top features per group
- Enable group expansion
- Provide group navigation
For implementation details and examples, see the Search API Reference.
Was this page helpful?