First of all, I am aware that we cannot use the OR operator inside the KeyConditionExpression
.
I am storing my I18n keys in the database and I have the following data structure:
{
"de": "Key in German",
"en": "Key in English",
"pk_id": "I18N-12345"
}
I also have a UI where I have a text field that should allow me to filter the keys by any language text. In this case english or german, represented by the keys de
and en
.
I wanted to achieve a query whose Key Condition Expression looks like this:
{
KeyConditionExpression: "begins_with(#de, :search_text) OR begins_with(#en, :search_text)"
}
As said before, this would be ideal, but since we don't have the OR
operation, I really don't know how to modify the query or how to create a GSI that allow me to make this query.
Thanks