PHP Class Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Response\DocumentFactory

Author: Aurelien FOUCRET ([email protected])
Mostra file Open project: smile-sa/elasticsuite Class Usage Examples

Public Methods

Method Description
__construct ( Magento\Framework\ObjectManagerInterface $objectManager, Magento\Framework\Search\EntityMetadata $entityMetadata, string $instanceName = 'Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Response\Document' ) Constructor.
create ( array $rawDocument ) : Document Create search dcument instance from a ES hit.

Method Details

__construct() public method

Constructor.
public __construct ( Magento\Framework\ObjectManagerInterface $objectManager, Magento\Framework\Search\EntityMetadata $entityMetadata, string $instanceName = 'Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Response\Document' )
$objectManager Magento\Framework\ObjectManagerInterface Object manager.
$entityMetadata Magento\Framework\Search\EntityMetadata Entity metadata configurartion.
$instanceName string Object instantiated type.

create() public method

Create search dcument instance from a ES hit.
public create ( array $rawDocument ) : Document
$rawDocument array ES raw hit.
return Document