private function getField(ContainerConfigurationInterface $containerConfiguration, OptimizerInterface $optimizer)
    {
        $attributeCode = $optimizer->getConfig('attribute_code');

        try {
            $attribute = $this->getAttribute($attributeCode);
            $field     = $this->mappingHelper->getFilterField($attribute);
        } catch (\Magento\Framework\Exception\NoSuchEntityException $exception) {
            try {
                $field = $containerConfiguration->getMapping()->getField($attributeCode);
                $field = $field->getName();
            } catch (\LogicException $exception) {
                $field = $attributeCode;
            }
        }

        return $field;
    }
private function getField(ContainerConfigurationInterface $containerConfiguration, OptimizerInterface $optimizer)
    {
        $attributeCode = $optimizer->getConfig('attribute_code');

        try {
            $attribute = $this->getAttribute($attributeCode);
            $field     = $this->mappingHelper->getFilterField($attribute);
        } catch (\Magento\Framework\Exception\NoSuchEntityException $exception) {
            try {
                $field = $containerConfiguration->getMapping()->getField($attributeCode);
                $field = $field->getName();
            } catch (\LogicException $exception) {
                $field = $attributeCode;
            }
        }

        return $field;
    }
private function getField ( ContainerConfigurationInterface $ containerConfiguration , OptimizerInterface $ optimizer ) { $ attributeCode = $ optimizer -> getConfig ( 'attribute_code' ) ; try { $ attribute = $ this -> getAttribute ( $ attributeCode ) ; $ field = $ this -> mappingHelper -> getFilterField ( $ attribute ) ; } catch ( \ Magento \ Framework \ Exception \ NoSuchEntityException $ exception ) { try { $ field = $ containerConfiguration -> getMapping ( ) -> getField ( $ attributeCode ) ; $ field = $ field -> getName ( ) ; } catch ( \ LogicException $ exception ) { $ field = $ attributeCode ; } } return $ field ; }
Get field to apply boost on.

@param ContainerConfigurationInterface $containerConfiguration Container Configuration
@param OptimizerInterface              $optimizer              Optimizer

@return string
Get field to apply boost on .