|  | @@ -34,6 +34,32 @@ To index a document with a join, the name of the relation and the optional paren
 | 
	
		
			
				|  |  |  of the document must be provided in the `source`.
 | 
	
		
			
				|  |  |  For instance the following creates two parent documents in the `my_parent` context:
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +[source,js]
 | 
	
		
			
				|  |  | +--------------------------------------------------
 | 
	
		
			
				|  |  | +PUT my_index/doc/1?refresh
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +  "text": "This is a parent document",
 | 
	
		
			
				|  |  | +  "my_join_field": {
 | 
	
		
			
				|  |  | +    "name": "my_parent" <1>
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +PUT my_index/doc/2?refresh
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +  "text": "This is a another parent document",
 | 
	
		
			
				|  |  | +  "my_join_field": {
 | 
	
		
			
				|  |  | +    "name": "my_parent"
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +--------------------------------------------------
 | 
	
		
			
				|  |  | +// CONSOLE
 | 
	
		
			
				|  |  | +// TEST[continued]
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<1> This document is a `my_parent` document.
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +When indexing parent documents, you can choose to specify just the name of the relation
 | 
	
		
			
				|  |  | +as a shortcut instead of encapsulating it in the normal object notation:
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  [source,js]
 | 
	
		
			
				|  |  |  --------------------------------------------------
 | 
	
		
			
				|  |  |  PUT my_index/doc/1?refresh
 | 
	
	
		
			
				|  | @@ -51,7 +77,7 @@ PUT my_index/doc/2?refresh
 | 
	
		
			
				|  |  |  // CONSOLE
 | 
	
		
			
				|  |  |  // TEST[continued]
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -<1> This document is a `my_parent` document.
 | 
	
		
			
				|  |  | +<1> Simpler notation for a parent document just uses the relation name.
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  When indexing a child, the name of the relation as well as the parent id of the document
 | 
	
		
			
				|  |  |  must be added in the `_source`.
 |