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
I have next simple exaple
$manager = $this->get('es.manager.user_index.auction_document');
$search = $manager->createSearch();
$hasParentQuery = new HasParentQuery(
'user_document',
new MatchAllQuery(),
["inner_hits" => new MatchAllQuery()]
);
$search->addQuery($hasParentQuery);
$result = $manager->execute($search);
dump($result);
die;
Inner hits you can get through the raw iterator. It is too complicated to convert them to the objective representation. Not sure if I will ever add inner hits support to the DocumentIterator.
Hi,
I have next simple exaple
$manager = $this->get('es.manager.user_index.auction_document');
$search = $manager->createSearch();
$hasParentQuery = new HasParentQuery(
'user_document',
new MatchAllQuery(),
["inner_hits" => new MatchAllQuery()]
);
$search->addQuery($hasParentQuery);
$result = $manager->execute($search);
dump($result);
die;
That gives me inner hits with query results.
DocumentIterator {#681 ▼
-aggregations: null
#documents: array:4 [▼
0 => array:8 [▼
"_index" => "user_index"
"_type" => "auction_document"
"_id" => "1847622"
"_score" => 1.0
"_parent" => "53247"
"_routing" => "53247"
"_source" => array:43 [▶]
"inner_hits" => array:1 [▼
"user_document" => array:1 [▶]
]
]
1 => array:8 [▶]
2 => array:8 [▶]
3 => array:8 [▶]
]
-count: 4
-converter: Converter {#205 ▶}
-manager: Manager {#840 ▶}
-managerConfig: array:6 [▶]
-scrollId: null
-scrollDuration: null
-key: 0
-aggregations: []
}
How can I get inner hits? Don't see any getter neither on result search object neither on document object
Does it exist?
The text was updated successfully, but these errors were encountered: