Iot Fleet Indexing - search-index response includes random named shadow

0

I have a bunch of things, each thing having multiple named shadows. I am interested in one specific named shadow when performing a search for things.

When I perform a search, I get a random named shadow in the shadow property of the response.

How can I control which shadow is returned?

There is an example of the query I'm doing here https://docs.aws.amazon.com/iot/latest/developerguide/managing-index.html

See Querying a thing index

preguntada hace 2 años359 visualizaciones
1 Respuesta
0

Ok, so I think the issue was that I had crafted the shadow field index incorrectly.

I had used a wild card in the field. i.e. shadow.name.*.reported.device.reference.

I updated this to reference the specific name of the shadow I wanted. i.e. shadow.name.AgentState.reported.device.reference

I also had to wait some amount of time before the correct field was indexed before search queries started to consistently return this specific shadow.

Suggestion the documentation doesn't explicitly call out the link between the shadow being indexed and the shadow being returned from the query. This of course is somewhat intuitive when you think about it, but it would be really nice to have it stated in documentation so that one does not feel like they are guessing.

UPDATE

It seems the above is not always true. While most things seem to return with the shadow that contains the indexed property, some return with other shadows.

Any suggestions are welcome.

respondido hace 2 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