Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Latest
Describe the issue:
We have a freelance marketplace platform with two sources of truth stored in DynamoDB:
- Freelancer Profile — live document, always up to date. Contains name, location, skills, work history, portfolio. 1 profile per freelancer.
- Proposal — a freelancer can submit proposals to many projects. Contains proposal status, inbox status, submitted date, project id. 1 document per proposal.
The relationship is:
1 Freelancer Profile → many proposals
We use OpenSearch purely as a search and filter layer — we only need OpenSearch to return IDs, then we fetch the full data from DynamoDB
In application, company can post job and freelancer can apply to the job. The page can search, sort and filter.
Option 1 — Single index, 1 document per proposal (full denormalisation)
Merge all profile fields and proposal fields into one document per proposal. Purpose-built search index separate from DynamoDB source of truth.
Option 2 — Two indices + terms lookup
freelancer_profiles index for profile data. proposals index for proposal data. Use OpenSearch terms lookup (3.2+ query parameter) to dynamically cross-reference at query time.
Option 3 — Parent-child join
Single index using OpenSearch join field. Freelancer profile is the parent document, proposals are child documents on the same shard.
Option 4 — Nested documents
Single index where freelancer profile is the root document and proposals are nested objects inside the same document. 1 document per freelancer containing all their proposals as a nested array.
Looking for solid real world design that could share your thought or better design because I want to optimise for performance
Configuration:
Relevant Logs or Screenshots: