FriendsOfAkeneo / ExtendedAttributeTypeBundle

Extra attribute types for Akeneo PIM
23 stars 19 forks source link

Reindex issue #59

Open jjdiaz opened 6 years ago

jjdiaz commented 6 years ago

Hi,

If I try

bin/console pim:product-model:index --all --env=prod

and then

bin/console pim:product:index --all --env=prod

I get the next error:

`27776 products to index Indexing products 1 to 100 14:48:35 ERROR [console] Error thrown while running command "pim:product:index --all --env=prod". Message: "{"type":"mapper_parsing_exception","reason":"failed to parse [values.cloudinary_main_url-textCollection.]","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:6130"}}" ["error" => Akeneo\Bundle\ElasticsearchBundle\Exception\IndexationException { …},"command" => "pim:product:index --all --env=prod","message" => "{"type":"mapper_parsing_exception","reason":"failed to parse [values.cloudinary_main_url-textCollection.]","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:6130"}}"] []

In Client.php line 277:

{"type":"mapper_parsing_exception","reason":"failed to parse [values.cloudinary_main_url-textCollection.]","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:6130
"}}

pim:product:index [-1|--all] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] []... ` Please, help. The configuration on pim_parameters.yml and AppKernel.php is ok and according whit de doc.

BR

mmetayer commented 6 years ago

Hello @jjdiaz, I assume you upgraded your version recently, could you tell us what versions you are using (PIM + ExtendedAttributeTypeBundle), and which ones you were previously using?

Regards,

jjdiaz commented 6 years ago

Hi,

Akeneo version: Versión (EE): 2.0.20 Hazel Versión (CE): 2.0.20 Rebel Rabbit I try with version 2.1 and same results. Extended attribute type bundle version: 2.0.2

I use the extended Attribute to store urls from Cloudinary DAM.

After executing:

curl -XPUT "http://localhost:9200/akeneo_pim_product/_settings" -d '{ "index" : { "max_result_window" : 50000 } }'

I got the error on the attached picture

reindexing_fail

jjdiaz commented 6 years ago

Another issue that I have is when deleting an Extended Attribute from de UI. The log indicates:

[2018-04-10 05:55:06] request.INFO: Matched route "pim_enrich_attribute_rest_remove". {"route":"pim_enrich_attribute_rest_remove","route_parameters":{"_controller":"pim_enrich.controller.rest.attribute:removeAction","code":"clo_img_2","_route":"pim_enrich_attribute_rest_remove"},"request_uri":"http://ixia-akeneo.devi4.com/rest/attribute/clo_img_2","method":"DELETE"} [] [2018-04-10 05:55:07] request.CRITICAL: Uncaught PHP Exception Pim\Component\Catalog\Exception\UnsupportedFilterException: "Filter on property "clo_img_2" is not supported or does not support operator "NOT EMPTY"" at /local/akeneo/vendor/akeneo/pim-community-dev/src/Pim/Component/Catalog/Query/ProductQueryBuilder.php line 138 {"exception":"[object] (Pim\\Component\\Catalog\\Exception\\UnsupportedFilterException(code: 0): **Filter on property \"clo_img_2\" is not supported or does not support operator \"NOT EMPTY\"** at /local/akeneo/vendor/akeneo/pim-community-dev/src/Pim/Component/Catalog/Query/ProductQueryBuilder.php:138)"} []

mmetayer commented 6 years ago

@jjdiaz, the logs shown in your last comment make me think of a cache issue, did you clear your prod cache? Also, if you recently updated from an earlier version of the bundle, you should also reset your elasticsearch indexes, as mentioned in the README:

    php bin/console cache:clear --no-warmup --env=prod
    php bin/console akeneo:elasticsearch:reset-indexes --env=prod
    php bin/console pim:product-model:index --all --env=prod
    php bin/console pim:product:index --all --env=prod
userz58 commented 6 years ago

I have this problem when installing.

Prepare database schema Dropped database for connection namedakeneo_pim Created databaseakeneo_pim` for connection named default ATTENTION: This operation should not be executed in a production environment.

Creating database schema... Database schema created successfully! Nothing to update - your database is already in sync with the current entity metadata. Reset elasticsearch indexes

In Connection.php line 610:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown setting [index.mapping.total_fields.limit.0] did you mean any of [index.mapping.total_fields.limit, index.mapping.nested_fields.limit]?"}],"type":"illegal_argument_exception","reason":"unkno wn setting [index.mapping.total_fields.limit.0] did you mean any of [index.mapping.total_fields.limit, index.mapping.nested_fields.limit]?"},"status":400}

The command terminated with an error code: 400. Error during PIM installation. The command terminated with an error code: 400.`

I must remove index parameters from pim_parameters.yml for normal installation

elasticsearch_index_configuration_files parameters:
        - '%pim_ce_dev_src_folder_location%/src/Pim/Bundle/CatalogBundle/Resources/elasticsearch/index_configuration.yml'
        #- '%kernel.root_dir%/../vendor/akeneo/pim-community-dev/src/Pim/Bundle/CatalogBundle/Resources/elasticsearch/index_configuration.yml'
        #- '%kernel.root_dir%/../vendor/akeneo/extended-attribute-type/src/Resources/config/elasticsearch/index_configuration.yml'