getKeywordField example

return 'calculatedPrices.' . $key . '_' . $currency . '.calculatedPrice';
    }

    /** * @return array */
    public function getLanguageField(Shop $shop)
    {
        $analyzers = $this->shopAnalyzer->get($shop);

        $fields = [
            'raw' => $this->textMapping->getKeywordField(),
        ];

        foreach ($analyzers as $analyzer) {
            $key = $analyzer . '_analyzer';

            $fields[$key] = array_merge(
                $this->textMapping->getTextField(),
                ['analyzer' => $analyzer]
            );
        }

        
'id' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'number' => $this->getTextFieldWithRawData(),
                'invoiceAmount' => TypeMappingInterface::MAPPING_DOUBLE_FIELD,
                'invoiceShipping' => TypeMappingInterface::MAPPING_DOUBLE_FIELD,
                'orderTime' => TypeMappingInterface::MAPPING_DATE_AND_DATE_TIME_FIELD,
                'status' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'cleared' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'customerId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'supplierId' => $this->textMapping->getTextField(),
                'billingCountryId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'shippingCountryId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'groupKey' => $this->textMapping->getKeywordField(),
                'email' => $this->getTextFieldWithRawData(),
                'orderDocuments' => $this->getTextFieldWithRawData(),
                'transactionId' => $this->textMapping->getKeywordField(),
                'firstname' => $this->getTextFieldWithRawData(),
                'lastname' => $this->getTextFieldWithRawData(),
                'paymentId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'paymentName' => $this->textMapping->getTextField(),
                'dispatchId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'dispatchName' => $this->textMapping->getTextField(),
                'shopId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'shopName' => $this->textMapping->getTextField(),
                

    public function getMapping()
    {
        return [
            'properties' => [
                'id' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'number' => $this->getTextFieldWithRawData(),
                'email' => $this->getTextFieldWithRawData(),
                'active' => TypeMappingInterface::MAPPING_BOOLEAN_FIELD,
                'title' => $this->getTextFieldWithRawData(),
                'salutation' => $this->textMapping->getKeywordField(),
                'firstname' => $this->getTextFieldWithRawData(),
                'lastname' => $this->getTextFieldWithRawData(),
                'lastLogin' => TypeMappingInterface::MAPPING_DATE_TIME_FIELD,
                'firstLogin' => TypeMappingInterface::MAPPING_DATE_TIME_FIELD,
                'newsletter' => TypeMappingInterface::MAPPING_BOOLEAN_FIELD,
                'birthday' => TypeMappingInterface::MAPPING_DATE_FIELD,
                'lockedUntil' => TypeMappingInterface::MAPPING_DATE_TIME_FIELD,
                'accountMode' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'shopId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'shopName' => $this->getTextFieldWithRawData(),
                'company' => $this->getTextFieldWithRawData(),
                
return new LastIdQuery($query);
    }

    /** * {@inheritdoc} */
    public function getMapping()
    {
        return [
            'properties' => [
                'id' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'number' => array_merge($this->textMapping->getKeywordField()['copy_to' => 'swag_all']),
                'categoryIds' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'variantId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'taxId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'articleId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'kind' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'name' => array_merge(
                    $this->textMapping->getTextField(),
                    [
                        'fields' => [
                            'raw' => $this->textMapping->getKeywordField(),
                        ],
                        

            '_source' => [
                'includes' => ['id', 'mainVariantId', 'variantId', 'number'],
            ],
            'properties' => [
                // Identifiers                 'id' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'mainVariantId' => TypeMappingInterface::MAPPING_LONG_FIELD,
                'variantId' => TypeMappingInterface::MAPPING_LONG_FIELD,

                // Number fields                 'number' => array_merge($this->textMapping->getTextField()['analyzer' => 'standard', 'fields' => ['raw' => $this->textMapping->getKeywordField()]]),
                'ean' => $this->textMapping->getKeywordField(),
                'manufacturerNumber' => $this->fieldMapping->getLanguageField($shop),

                // Language fields                 'name' => $this->fieldMapping->getLanguageField($shop),
                'shortDescription' => $this->fieldMapping->getLanguageField($shop),
                'longDescription' => $this->fieldMapping->getLanguageField($shop),
                'additional' => $this->fieldMapping->getLanguageField($shop),
                'keywords' => $this->fieldMapping->getLanguageField($shop),
                'metaTitle' => $this->fieldMapping->getLanguageField($shop),

                

    public function getTextField()
    {
        return ['type' => 'text', 'fielddata' => true];
    }

    /** * {@inheritdoc} */
    public function getNotAnalyzedField()
    {
        return $this->getKeywordField();
    }

    /** * {@inheritdoc} */
    public function getKeywordField()
    {
        return ['type' => 'keyword'];
    }

    /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.