Can you use an array as a index key?

0

Seeking clarification, the doc page (https://docs.aws.amazon.com/qldb/latest/developerguide/working.create.html) says:

"Indexes can only be created on a single top-level field. Composite, nested, unique, and function-based indexes are currently not supported."

So does that mean that you can only create an index on simple Ion values? I'd like to use a tuple/list of strings as a key, and while it'd be easy enough to generate a single string from the list, it'd be nice to avoid it if possible.

Thanks!

已提問 3 年前檢視次數 527 次
2 個答案
0

Hello TomCulliton, thanks for reaching out to us!

Yes, you can create an index on any Ion types, including Lists and Structs. However, the index lookup is only by equality of the Ion value regardless of the type of the Ion Value. For example, you can't find a value within an indexed List. Please let me know if this helps.

Thanks,
QLDB team

已回答 3 年前
0

Equality to the whole list is fine and exactly what I was looking for. Many thanks!

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南