anchor.diff:  [[painless-context-examples]]
   === Context examples
   
  -To run the examples, index the sample seat data into Elasticsearch. The examples
  -must be run sequentially to work correctly.
  +Complete the following steps to index the `seat` sample data into {es}. The
  +examples for each context rely on this sample data.
   
  -. Download the
  -https://download.elastic.co/demos/painless/contexts/seats.json[seat data]. This
  -data set contains booking information for a collection of plays. Each document
  -represents a single seat for a play at a particular theater on a specific date
  -and time.
  -+
  -[source,js]
  -----
  -curl https://download.elastic.co/demos/painless/contexts/seats.json --output seats.json
  -----
  -// NOTCONSOLE
  -+
  -Each document contains the following fields:
  -+
  +Each document in the `seat` data contains the following fields:
  +
   `theatre` ({ref}/keyword.html[`keyword`])::
           The name of the theater the play is in.
   `play` ({ref}/text.html[`text`])::
  
positive.code: ----
  +
  
  . Run the <<painless-ingest-processor-context, ingest processor context>>
  example. This sets up a script ingest processor used on each document as the
  seat data is indexed.
  
  . Index the seat data:
  +
  [source,js]
  ----
  curl -XPOST "localhost:9200/seats/_bulk?pipeline=seats" -H "Content-Type: application/x-ndjson" --data-binary "@/<local-file-path>/seats.json"
  ----
  // NOTCONSOLE
  
negative.code: `time` ({ref}/keyword.html[`keyword`])::
          The time of the play as a keyword.
  
  ==== Prerequisites
  Start an {ref}/getting-started-install.html[{es} instance], and then access the
  {kibana-ref}/console-kibana.html[Console] in {kib}.
  
  ==== Configure the `seat` sample data
  . From the {kib} Console, create {ref}/mapping.html[mappings] for the sample
  data:
  +
  [source,console]
  ----
  