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!

preguntada hace 3 años527 visualizaciones
2 Respuestas
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

respondido hace 3 años
0

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

respondido hace 3 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas