I have data in a DynamoDB database, and I need to search/filter on 10+ attributes (one or many at the same time) without resorting to scanning the entire database for each query.
- I’ve seen compound sort keys recommended when there are 2 or 3 attributes to search on, but not when there are 10+.
- I could create DynamoDB indexes for each of the possible filter combinations, but with 10+ attributes to filter on, the number of indexes would be in the millions.
- I considered copying the data into a relational database that I can just do SQL queries on, but I don’t want to add RDS to my tech stack just for this one problem.
Based on the answers to this question, Elastic search vs Dynamodb for Filtering, it seems like ElasticSearch/OpenSearch is the way to go. Does this seem right?