Painless syntax doc inconsistancy

It's probably my lack of understanding, but in the doc document fields are sometimes referenced (top of link, in the conditional) as:

doc[item]

and other times (bottom of the linked page) as

ctx._source.item

It seems the first way never works for me. What is the difference?

I'm reviewing for the exam and all the examples there use the second format.

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.