You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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?
The text was updated successfully, but these errors were encountered:
Hi,
I made next mappings
class Hotels
{
/**
* @var int
* @es\Id()
*/
public $id;
}
Than I have hotel object as a parent
/**
*/
class Hotel
{
......
}`
and booking as a child
/**
/
class Booking
{
/*
*/
public $price;
}
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?
The text was updated successfully, but these errors were encountered: