anchor.diff:  <7> The +DStream+ is configured to index the data accordingly using the +saveToEsWithMeta+ method
   
   [float]
  -[[spark-write-meta-java]]
  +[[spark-streaming-write-meta-java]]
   ===== Java
   
   In a similar fashion, on the Java side, +JavaEsSparkStreaming+ provides +saveToEsWithMeta+ methods that are applied to +JavaPairDStream+ (the equivalent in Java of +DStream[(K,V)]+).
  
positive.code: This sounds more complicated than it is, so let us see some examples.
  
  [float]
  [[spark-write-meta-scala]]
  ===== Scala
  
  Pair ++DStreams++s, or simply put ++DStreams++s with the signature +DStream[(K,V)]+ can take advantage of the +saveToEsWithMeta+ methods that are available either through the _implicit_ import of +org.elasticsearch.spark.streaming+ package or +EsSparkStreaming+ object.
  
negative.code: <4> launch stream job
  
  [float]
  [[spark-streaming-write-dyn]]
  ==== Writing to dynamic/multi-resources
  
  For cases when the data being written to {es} needs to be indexed under different buckets (based on the data content) one can use the `es.resource.write` field which accepts a pattern that is resolved from the document content, at runtime. Following the aforementioned <<cfg-multi-writes,media example>>, one could configure it as follows:
  
  [float]
  [[spark-streaming-write-dyn-scala]]
  ===== Scala
  
  [source,scala]
  