I have a table with Local Index like below.
how to make a query like startDate < InvoiceDate < endDate and sort the result descending by InvoiceDateLocalIndex ??
as far as I know, to sort the result I need to using InvoiceDateLocalIndex. But if I'd used , I got the error "Filter Expression can only contain non-primary key attributes: Primary key attribute: InvoiceDate"
"IndexName": "InvoiceDateLocalIndex",
"KeySchema": [
{
"AttributeName": "FinanceYear",
"KeyType": "HASH"
},
{
"AttributeName": "InvoiceDate",
"KeyType": "RANGE"
}
]