message: "{"took":0,"errors":true,"items":[{"index":{"_index":"hotels","_type":"_doc","_id":"1-2","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"illegal_argument_exception","reason":"[routing] is missing for join field [hotel_bookings_join_field]"}}}}]}"
Seems @ES\Routing() is not processed properly but I cant get where is it done at all
Can anybody help with that?
Hi, I made next mappings
class Hotels { /**
@ES\Id() */ public $id;
/**
@ES\Routing() */ public $routing;
/**
@ES\Embedded(class="App\Document\Hotel") */ public $hotel;
/**
@ES\Embedded(class="App\Document\Booking") */ public $booking;
/**
) */ public $hotelBookingsJoinField;
public function __construct() { $this->hotel = []; $this->booking = []; } }
Than I have hotel object as a parent
/**
and booking as a child
/**
while indexing parent document - all is working
but I am trying to index child document e.g
$booking = new Booking(); $booking->price = 100;
$document = new Hotels(); $document->id = '2'; $document->routing = 1; $document->booking = $booking; $document->hotelBookingsJoinField = ['name' => 'booking_child', 'parent' => 1]; $indexManager = $this->container->get(Hotels::class); $indexManager->persist($document); $indexManager->commit();
message: "{"took":0,"errors":true,"items":[{"index":{"_index":"hotels","_type":"_doc","_id":"1-2","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"illegal_argument_exception","reason":"[routing] is missing for join field [hotel_bookings_join_field]"}}}}]}"
Seems @ES\Routing() is not processed properly but I cant get where is it done at all Can anybody help with that?