Clinia Query Domain-Specific Language (DSL)
Search parameters define how to query and retrieve records from Clinia’s data partitions. They provide comprehensive control over filtering, ranking, aggregation, and result presentation, enabling everything from simple lookups to complex multi-modal searches across your data.The Data Partition API search endpoints accept a single JSON-like object that controls all aspects of your search query.
Unified Query DSL: Both resources and relationships use the same DSL and search parameters, even though they have distinct API endpoints. You can search resources and relationships using identical query syntax and parameters.
Core Search Parameters
The foundation of every search request lies in these core parameters that control what data to retrieve and how to match it.Filtering
Use for exact matching and precise filtering. Creates binary include/exclude decisions without affecting relevance scores.
Example: Status and Date Filtering
Query
Use for relevance-based matching and content discovery. Contributes to relevance scoring and ranking of results.
Example: Text and Semantic Search
Both
filter
and query
accept any operator and can be combined in the same search request for hybrid filtering and ranking strategies.Ranking and Sorting
Control the order and relevance scoring of your search results with these parameters.Ranking
Controls how results are scored and ordered. Choose between default relevance algorithms or AI-powered semantic ranking.
- Default Ranking
- Semantic Ranking
Uses Clinia’s standard relevance algorithms based on text matching and field importance.
Sort
Apply explicit sorting independent of relevance scoring. Useful for chronological or alphabetical ordering.
Example: Sort by Date
ASC
(ascending)DESC
(descending, default)
When both
ranking
and sort
are specified, sorting takes precedence over ranking for result ordering.Result Enhancement
Enhance your search results with additional context and related data.Highlighting
Request highlighted snippets for specific properties to show query matches in search results.
- Example: Highlight Multiple Fields
- Response: Highlighted Results
Traversed Properties
Include data from connected resources linked by relationships without separate API calls. Essential for comprehensive result context.
Example: Include Related Data
*
: Return all traversed properties@relationshipType.*
: All properties from a specific relationship@relationshipType.@adjacentType.property
: Specific properties from chained relationships
Aggregations
Generate summary statistics and faceted navigation data alongside search results. Build powerful filter interfaces and analytics.
Lexical Aggregation
Count and group records by discrete property values to create filter options and understand data patterns.Parameter | Type | Description |
---|---|---|
path | string | Property to aggregate on |
size | integer | Maximum unique values to return (default: 20) |
prefix | string | Optional filter to narrow aggregation values |
Pagination
Zero-based page number for result pagination. Use with
perPage
to navigate through large result sets.Number of results per page (1-250). Balance between performance and user experience needs.
Example: Second Page with 50 Results
Limits:
perPage
supports 1-250 results, while page
starts from 0 and only has no pre-defined limit.Search Patterns
Common search patterns and real-world examples to get you started quickly.- Basic Property Search
- Hybrid Search
- Faceted Search
- Federated Search
- Conditional Result Enhancement
- Complex Nested Filtering
Simple filtering combined with text matching for straightforward queries over a single collection.