[SOLVED] How to start index of importing items? (Elasticsearch)
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- ЕвгенияСемихова(ИПСемиховаЕ.А.)
- Posts: 67
- Joined: 11 Jan 2025, 09:45
[SOLVED] How to start index of importing items? (Elasticsearch)
I made my first import of 20,000 items according to your instructions. After some minor adjustments, all 20,000 items were uploaded to the seller's website.
After that, no products appear on the front site until I just log in to the product and save it. You can do mass editing for 500 products, but this will not work when there are more than 1 million products. I studied the forum and found no similar problems. I've tried all the cronjobs manually, but I haven't achieved any results. I understand that the problem is triggering the elasticsearch index. Please help me how I can to index imported products automatically? The system is already fully configured and I don't want to experiment and change everything.
UPD: I think my trouble at this part:

Can you write a bit more information about this both parameters, please?
UPD_2: I read about the parameters in the Elasticsearch help, but I'm still afraid to experiment, I'd like to get some advice from a professional.
After that, no products appear on the front site until I just log in to the product and save it. You can do mass editing for 500 products, but this will not work when there are more than 1 million products. I studied the forum and found no similar problems. I've tried all the cronjobs manually, but I haven't achieved any results. I understand that the problem is triggering the elasticsearch index. Please help me how I can to index imported products automatically? The system is already fully configured and I don't want to experiment and change everything.
UPD: I think my trouble at this part:

Can you write a bit more information about this both parameters, please?
UPD_2: I read about the parameters in the Elasticsearch help, but I'm still afraid to experiment, I'd like to get some advice from a professional.
Last edited by ЕвгенияСемихова(ИПСемиховаЕ.А.) on 24 Feb 2025, 12:52, edited 1 time in total.
Debian 12, PHP 8.3, Server 1 = Aimeos 2024.10.13, Server 2 = ES 8.17.1
life is full of many new and interesting things
life is full of many new and interesting things
Re: How to start index of importing items? (Elasticsearch)
How did you import the products?ЕвгенияСемихова(ИПСемиховаЕ.А.) wrote: ↑15 Feb 2025, 19:55 I made my first import of 20,000 items according to your instructions. After some minor adjustments, all 20,000 items were uploaded to the seller's website.
After that, no products appear on the front site until I just log in to the product and save it.
They are not relevant for you at the moment because they can be used to speed up imports if you have 100+ million items.ЕвгенияСемихова(ИПСемиховаЕ.А.) wrote: ↑15 Feb 2025, 19:55 Can you write a bit more information about this both parameters, please?
UPD_2: I read about the parameters in the Elasticsearch help, but I'm still afraid to experiment, I'd like to get some advice from a professional.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- ЕвгенияСемихова(ИПСемиховаЕ.А.)
- Posts: 67
- Joined: 11 Jan 2025, 09:45
Re: How to start index of importing items? (Elasticsearch)
Step by step:How did you import the products?
1) Open seller's admin site by individual own sellers' login/passwd.
2) Open "catalog" and choose csv file:

3) Open ssh and send command: php artisan aimeos:jobs "product/import/csv"
At admin side without any errors (at log) and all items presents at sellers catalog:

But at front no one:

Also the same picture if I will send csv file to direct seller's direction at server.

So, items will publish, if I'll open it (only open) and just press "save" - then item will show at front.
So, if I'll choose 500 items and press just "enable" (they any way enabled by csv and have "anable" status)


- then all 500 items will showing at front site:

and now, if I'll import this csv file again - then all the importing goods disappear again:

what I have forget to do?
UPD: file from example csv with enabling publish row.

UPD_2: I double-checked all the settings and their compliance with the instructions for the elasticsearch module. Unfortunately, I did not find any discrepancies, and the products do not appear after importing from the csv file. I really hope for your help, there are no more options left.
Code: Select all
<?php
$multishop = $multiroute = [];
$prefix = env( 'SHOP_MULTILOCALE' ) ? '{locale}/' : '';
if( env( 'SHOP_MULTISHOP' ) ) {
$multishop = ['routes' => [
'admin' => ['prefix' => 'admin', 'middleware' => ['web']],
'jqadm' => ['prefix' => 'admin/{site}/jqadm', 'middleware' => ['web', 'auth', 'verified']],
'graphql' => ['prefix' => 'admin/{site}/graphql', 'middleware' => ['web', 'auth', 'verified']],
'jsonadm' => ['prefix' => 'admin/{site}/jsonadm', 'middleware' => ['web', 'auth', 'verified']],
'jsonapi' => ['prefix' => '{site}/jsonapi', 'middleware' => ['web', 'api']],
'account' => ['prefix' => $prefix . '{site}/profile', 'middleware' => ['web', 'auth', 'verified']],
'default' => ['prefix' => $prefix . '{site}/shop', 'middleware' => ['web']],
'basket' => ['prefix' => $prefix . '{site}/shop', 'middleware' => ['web']],
'checkout' => ['prefix' => $prefix . '{site}/shop', 'middleware' => ['web']],
'confirm' => ['prefix' => $prefix . '{site}/shop', 'middleware' => ['web']],
'supplier' => ['prefix' => $prefix . '{site}/s', 'middleware' => ['web']],
'page' => ['prefix' => $prefix . '{site}/p', 'middleware' => ['web']],
'home' => ['prefix' => $prefix . '{site}', 'middleware' => ['web']],
'update' => ['prefix' => '{site}'],
] ];
}
if( env( 'SHOP_MULTIROUTE' ) ) {
$multiroute = [
'client' => [
'html' => [
'catalog' => [
'multiroute' => true,
'detail' => [
'url' => [
'target' => 'aimeos_resolve',
'filter' => ['d_name', 'd_prodid', 'd_pos'],
],
],
'lists' => [
'url' => [
'target' => 'aimeos_resolve',
'filter' => [],
],
],
'tree' => [
'url' => [
'target' => 'aimeos_resolve',
'filter' => ['f_name', 'f_catid'],
],
],
],
'cms' => [
'page' => [
'url' => [
'target' => 'aimeos_resolve',
],
],
]
]
]
];
}
return array_replace_recursive( $multiroute, $multishop + [
'apc_enabled' => false, // enable for maximum performance if APCu is available
'apc_prefix' => 'aimeos:', // prefix for caching config and translation in APCu
'num_formatter' => 'Locale', // locale based number formatter (alternative: "Standard")
'pcntl_max' => 4, // maximum number of parallel command line processes when starting jobs
'version' => env( 'APP_VERSION', 1 ), // shop CSS/JS file version
'roles' => ['admin', 'editor'], // user groups allowed to access the admin backend
'panel' => 'dashboard', // panel shown in admin backend after login
'routes' => [
// Docs: https://aimeos.org/docs/latest/laravel/extend/#custom-routes
// Multi-sites: https://aimeos.org/docs/latest/laravel/customize/#multiple-shops
'admin' => ['prefix' => 'admin', 'middleware' => ['web']],
'jqadm' => ['prefix' => 'admin/{site}/jqadm', 'middleware' => ['web', 'auth']],
'graphql' => ['prefix' => 'admin/{site}/graphql', 'middleware' => ['web', 'auth']],
'jsonadm' => ['prefix' => 'admin/{site}/jsonadm', 'middleware' => ['web', 'auth']],
'jsonapi' => ['prefix' => 'jsonapi', 'middleware' => ['web', 'api']],
'account' => ['prefix' => $prefix . 'profile', 'middleware' => ['web', 'auth']],
'default' => ['prefix' => $prefix . 'shop', 'middleware' => ['web']],
'basket' => ['prefix' => $prefix . 'shop', 'middleware' => ['web']],
'checkout' => ['prefix' => $prefix . 'shop', 'middleware' => ['web']],
'confirm' => ['prefix' => $prefix . 'shop', 'middleware' => ['web']],
'supplier' => ['prefix' => $prefix . 's', 'middleware' => ['web']],
'page' => ['prefix' => $prefix . 'p', 'middleware' => ['web']],
'home' => ['prefix' => $prefix, 'middleware' => ['web']],
'update' => [],
],
'page' => [
// Docs: https://aimeos.org/docs/latest/laravel/extend/#adapt-pages
'account-index' => [ 'locale/select', 'basket/mini','catalog/tree','catalog/search','account/profile','account/review','account/subscription','account/basket','account/history','account/favorite','account/watch','catalog/session' ],
'basket-index' => [ 'locale/select', 'catalog/tree','catalog/search','basket/standard','basket/bulk','basket/related' ],
'catalog-count' => [ 'catalog/count' ],
'catalog-detail' => [ 'locale/select', 'basket/mini','catalog/tree','catalog/search','catalog/stage','catalog/detail','catalog/session' ],
'catalog-home' => [ 'locale/select','basket/mini','catalog/tree','catalog/search','catalog/home', 'cms/page' ],
'catalog-list' => [ 'locale/select','basket/mini','catalog/filter','catalog/tree','catalog/search','catalog/price','catalog/supplier','catalog/attribute','catalog/session','catalog/stage','catalog/lists' ],
'catalog-session' => [ 'locale/select','basket/mini','catalog/tree','catalog/search','catalog/session' ],
'catalog-stock' => [ 'catalog/stock' ],
'catalog-suggest' => [ 'catalog/suggest' ],
'catalog-tree' => [ 'locale/select','basket/mini','catalog/filter','catalog/tree','catalog/search','catalog/price','catalog/supplier','catalog/attribute','catalog/session','catalog/stage','catalog/lists' ],
'checkout-confirm' => [ 'catalog/tree','catalog/search','checkout/confirm' ],
'checkout-index' => [ 'locale/select', 'catalog/tree','catalog/search','checkout/standard' ],
'checkout-update' => [ 'checkout/update' ],
'supplier-detail' => [ 'locale/select','basket/mini','catalog/tree','catalog/search','supplier/detail','catalog/lists'],
'cms' => [ 'basket/mini','catalog/tree','cms/page' ],
],
'resource' => [
//add for connecting to elasticsearch
'es' => [
'hosts' => [
'192.168.0.4:9200',
],
'index' => 'aimeos',
'SSLVerification' => false, // for self-signed certificates
'basicAuthentication' => ['elastic', 'PASSWD'], // ElasticSearch 8+
'selectorClass' => '\Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector',
'settings' => [
'number_of_shards' => 5, // adapt to your needs
'number_of_replicas' => 0, // adapt to your needs
'max_result_window' => 10000, // maximum number of results retrieved
// 'refresh_interval' => -1, // for initial indexing only
],
// 'norefresh' => false, // for initial indexing only
],
//end of add for elasticsearch
//add for 2 connecting to elasticsearch
'es-stock' => [
'hosts' => [
'192.168.0.4:9200',
],
'index' => 'aimeos_stock',
'SSLVerification' => false, // for self-signed certificates
'basicAuthentication' => ['elastic', 'PASSWD'], // ElasticSearch 8+
'selectorClass' => '\Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector',
'settings' => [
'number_of_shards' => 5, // adapt to your needs
'number_of_replicas' => 0, // adapt to your needs
'max_result_window' => 10000, // maximum number of results retrieved
// 'refresh_interval' => -1, // for initial indexing only
],
// 'norefresh' => false, // for initial indexing only
],
//end of 2 add for elasticsearch
'db' => [
'adapter' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.driver', 'mysql' ),
'host' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.host', '127.0.0.1' ),
'port' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.port', '3306' ),
'socket' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.unix_socket', '' ),
'database' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.database', 'forge' ),
'username' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.username', 'forge' ),
'password' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.password', '' ),
'stmt' => config( 'database.default', 'mysql' ) === 'mysql' ? ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8mb4'; SET SESSION sql_mode='ANSI'"] : [],
'limit' => 3, // maximum number of concurrent database connections
'defaultTableOptions' => [
'charset' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.charset' ),
'collate' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.collation' ),
],
'driverOptions' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.options' ),
],
'fs' => [
'adapter' => 'Standard',
'tempdir' => storage_path( 'tmp' ),
'basedir' => public_path(),
'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/'),
],
'fs-media' => [
'adapter' => 'Standard',
'tempdir' => storage_path( 'tmp' ),
'basedir' => public_path( 'aimeos' ),
'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/aimeos',
],
'fs-mimeicon' => [
'adapter' => 'Standard',
'tempdir' => storage_path( 'tmp' ),
'basedir' => public_path( 'vendor/shop/mimeicons' ),
'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/vendor/shop/mimeicons',
],
'fs-theme' => [
'adapter' => 'Standard',
'tempdir' => storage_path( 'tmp' ),
'basedir' => public_path( 'vendor/shop/themes' ),
'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/vendor/shop/themes',
],
'fs-admin' => [
'adapter' => 'Standard',
'tempdir' => storage_path( 'tmp' ),
'basedir' => storage_path( 'admin' ),
],
'fs-export' => [
'adapter' => 'Standard',
'tempdir' => storage_path( 'tmp' ),
'basedir' => storage_path( 'export' ),
],
'fs-import' => [
'adapter' => 'Standard',
'tempdir' => storage_path( 'tmp' ),
'basedir' => storage_path( 'import' ),
],
'fs-secure' => [
'adapter' => 'Standard',
'tempdir' => storage_path( 'tmp' ),
'basedir' => storage_path( 'secure' ),
],
'mq' => [
'adapter' => 'Standard',
'db' => 'db',
],
'email' => [
'from-email' => config( 'mail.from.address' ),
'from-name' => config( 'mail.from.name' ),
],
],
'admin' => [
'jqadm' => [
'api' => [
'openai' => [
'key' => env( 'SHOP_OPENAI_APIKEY' )
],
'translate' => [
'key' => env( 'SHOP_DEEPL_APIKEY' )
],
'removebg' => [
'key' => env( 'SHOP_REMOVEBG_APIKEY' )
],
]
]
],
'client' => [
'html' => [
'basket' => [
'cache' => [
// 'enable' => false, // Disable basket content caching for development
],
],
'common' => [
'cache' => [
// 'force' => true // enforce caching for logged in users
],
],
'catalog' => [
'lists' => [
'basket-add' => true, // shows add to basket in list views
// 'infinite-scroll' => true, // load more products in list view
// 'size' => 48, // number of products per page
],
'selection' => [
'type' => [// how variant attributes are displayed
'color' => 'radio',
'length' => 'radio',
'width' => 'radio',
],
],
],
],
],
'controller' => [
//import and export
'jobs' => [
'product' => [
'import' => [
'csv' => [
'skip-lines' => 1 //skip first line
],
],
],
],
//end of import and export
'frontend' => [
'catalog' => [
'levels-always' => 3 // number of category levels for mega menu
]
]
],
'i18n' => [
'en' => [
'client' => [
'Suppliers' => ['Brands']
]
]
],
'madmin' => [
'cache' => [
'manager' => [
// 'name' => 'None', // Disable caching for development
],
],
'log' => [
'manager' => [
// 'loglevel' => 7, // Enable debug logging into madmin_log table
],
],
],
'mshop' => [
//start add for elasticsearch
'index' => [
'manager' => [
'name' => 'Elastic', // Only if products are not in DB
// 'name' => 'ElasticIndex', // If products exist in DB
'attribute' => [
'name' => 'Elastic',
],
'catalog' => [
'name' => 'Elastic',
],
'price' => [
'name' => 'Elastic',
],
'supplier' => [
'name' => 'Elastic',
],
'text' => [
'name' => 'Elastic',
],
]
],
//others line
// Only if products are not in DB
'product' => [
'manager' => [
'name' => 'Elastic',
'lists' => [
'name' => 'Elastic',
'type' => [
'name' => 'Elastic',
],
],
'property' => [
'name' => 'Elastic',
'type' => [
'name' => 'Elastic',
],
],
'type' => [
'name' => 'Elastic',
],
]
],
// Only if products are not in DB
'stock' => [
'manager' => [
'name' => 'Elastic',
'type' => [
'name' => 'Elastic',
],
]
],
//end of add for elasticsearch
'locale' => [
// 'site' => '<custom site code>', // used instead of "default"
//add marketplace
'manager' => [
'sitelevel' => 3
]
//end of Marketplace
]
],
'command' => [
],
'frontend' => [
],
'backend' => [
],
] );
Debian 12, PHP 8.3, Server 1 = Aimeos 2024.10.13, Server 2 = ES 8.17.1
life is full of many new and interesting things
life is full of many new and interesting things
- ЕвгенияСемихова(ИПСемиховаЕ.А.)
- Posts: 67
- Joined: 11 Jan 2025, 09:45
Re: How to start index of importing items? (Elasticsearch)
To collect statistics and identify the problem area, I switched back to the MySQL database. Launched aimeos:setup. After that, I repeated the import procedure from the same file.
At the end of the import, all the products appeared on the frontend.


It turns out that the problem is in elasticsearch itself, or in the connection configuration.
Please tell me where else can I check the settings for automatic publication of products on the site (after import)?
№2 - And another question arose: I also noticed last year at your demonstration that the number of products in the category on the site itself (frontend) is limited to 9999. I also noticed in the administrative part a limit on the number of products of 10 thousand pieces, although the rest of the products are perfectly located in the search. Tell me, can this restriction be changed in the settings?
UPD: my file: https://forum.radiodar.ru/applications/ ... 0a3dda3225
At the end of the import, all the products appeared on the frontend.


It turns out that the problem is in elasticsearch itself, or in the connection configuration.
Please tell me where else can I check the settings for automatic publication of products on the site (after import)?
№2 - And another question arose: I also noticed last year at your demonstration that the number of products in the category on the site itself (frontend) is limited to 9999. I also noticed in the administrative part a limit on the number of products of 10 thousand pieces, although the rest of the products are perfectly located in the search. Tell me, can this restriction be changed in the settings?
UPD: my file: https://forum.radiodar.ru/applications/ ... 0a3dda3225
Debian 12, PHP 8.3, Server 1 = Aimeos 2024.10.13, Server 2 = ES 8.17.1
life is full of many new and interesting things
life is full of many new and interesting things
Re: How to start index of importing items? (Elasticsearch)
Is it a caching issue? Can you check if this solves the problem after the CSV import too?ЕвгенияСемихова(ИПСемиховаЕ.А.) wrote: ↑19 Feb 2025, 14:14 It turns out that the problem is in elasticsearch itself, or in the connection configuration.
Code: Select all
php artisan aimeos:clear
It can but it shouldn't because counting all documents can be a very long lasting task (several seconds and more depending on the number of matched documents) and it will slow down your site to increase the limit much.ЕвгенияСемихова(ИПСемиховаЕ.А.) wrote: ↑19 Feb 2025, 14:14 №2 - And another question arose: I also noticed last year at your demonstration that the number of products in the category on the site itself (frontend) is limited to 9999. I also noticed in the administrative part a limit on the number of products of 10 thousand pieces, although the rest of the products are perfectly located in the search. Tell me, can this restriction be changed in the settings?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- ЕвгенияСемихова(ИПСемиховаЕ.А.)
- Posts: 67
- Joined: 11 Jan 2025, 09:45
Re: How to start index of importing items? (Elasticsearch)
I use this command in any unclear situation. Unfortunately it doesn't help - I just checked again - the imported product doesn't appear on the front page of the site.Is it a caching issue? Can you check if this solves the problem after the CSV import too?
Code: Select all
php artisan aimeos:clear

I'm already on the verge of hysteria

Debian 12, PHP 8.3, Server 1 = Aimeos 2024.10.13, Server 2 = ES 8.17.1
life is full of many new and interesting things
life is full of many new and interesting things
Re: How to start index of importing items? (Elasticsearch)
Can you please post one document that's indexed in ES. You can get it using:
curl '<server>:<port>/<index>/_search?size=1&pretty=true'
curl '<server>:<port>/<index>/_search?size=1&pretty=true'
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- ЕвгенияСемихова(ИПСемиховаЕ.А.)
- Posts: 67
- Joined: 11 Jan 2025, 09:45
Re: How to start index of importing items? (Elasticsearch)
This query:
Code: Select all
curl --user elastic:'PASSWD' -X GET 'http://192.168.0.4:9200/aimeos/_search?size=1&pretty=true'
Code: Select all
{
"took" : 5,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score" : 1.0,
"hits" : [
{
"_index" : "aimeos",
"_id" : "IXSPI5UBlisao1S-saMV",
"_score" : 1.0,
"_source" : {
"base" : {
"product.id" : "IXSPI5UBlisao1S-saMV",
"product.siteid" : "1.",
"product.ctime" : "2025-02-20 13:32:23",
"product.mtime" : "2025-02-20 13:32:23",
"product.editor" : "aimeos:jobs",
"product.url" : "transistor-1",
"product.type" : "default",
"product.code" : "TMP0000001",
"product.label" : "Transistor 1",
"product.status" : 1,
"product.dataset" : "",
"product.datestart" : null,
"product.dateend" : null,
"product.config" : [ ],
"product.scale" : 1.0,
"product.target" : "",
"product.ratings" : 0,
"product.rating" : "0",
"product.instock" : 0,
"product.boost" : 1.0
},
"product:has" : [
"catalog|default|15",
"price|default|#0",
"text|default|#1",
"text|default|#2"
],
"catalog" : [
{
"product.lists.id" : "_IXSPI5UBlisao1S-saMV_catalog_default_15",
"product.lists.siteid" : "1.",
"product.lists.domain" : "catalog",
"product.lists.refid" : "15",
"product.lists.datestart" : null,
"product.lists.dateend" : null,
"product.lists.config" : [ ],
"product.lists.position" : 0,
"product.lists.status" : 1,
"product.lists.type" : "default"
}
],
"price" : [
{
"product.lists.id" : "_IXSPI5UBlisao1S-saMV_price_default_#0",
"product.lists.siteid" : "1.",
"product.lists.domain" : "price",
"product.lists.refid" : "#0",
"product.lists.datestart" : null,
"product.lists.dateend" : null,
"product.lists.config" : [ ],
"product.lists.position" : 0,
"product.lists.status" : 1,
"product.lists.type" : "default",
"price.id" : "#0",
"price.siteid" : "1.",
"price.type" : "default",
"price.currencyid" : "RUB",
"price.domain" : "product",
"price.quantity" : 1.0,
"price.value" : "50.00",
"price.costs" : "0.00",
"price.rebate" : "0.00",
"price.taxvalue" : "0.0000",
"price.taxrates" : {
"tax" : "0.00"
},
"price.taxrate" : "0.00",
"price.taxflag" : true,
"price.status" : 1,
"price.label" : "RUB 50",
"domains" : [ ]
}
],
"text" : [
{
"product.lists.id" : "_IXSPI5UBlisao1S-saMV_text_default_#1",
"product.lists.siteid" : "1.",
"product.lists.domain" : "text",
"product.lists.refid" : "#1",
"product.lists.datestart" : null,
"product.lists.dateend" : null,
"product.lists.config" : [ ],
"product.lists.position" : 0,
"product.lists.status" : 1,
"product.lists.type" : "default",
"text.id" : "#1",
"text.siteid" : "1.",
"text.languageid" : null,
"text.type" : "short",
"text.label" : "short test",
"text.domain" : "product",
"text.content" : "short test",
"text.status" : 1,
"domains" : [ ]
},
{
"product.lists.id" : "_IXSPI5UBlisao1S-saMV_text_default_#2",
"product.lists.siteid" : "1.",
"product.lists.domain" : "text",
"product.lists.refid" : "#2",
"product.lists.datestart" : null,
"product.lists.dateend" : null,
"product.lists.config" : [ ],
"product.lists.position" : 1,
"product.lists.status" : 1,
"product.lists.type" : "default",
"text.id" : "#2",
"text.siteid" : "1.",
"text.languageid" : null,
"text.type" : "long",
"text.label" : "Описание находится в очереди на редактирование",
"text.domain" : "product",
"text.content" : "Описание находится в очереди на редактирование",
"text.status" : 1,
"domains" : [ ]
}
],
"domains" : [
"catalog",
"price",
"text"
],
"index.siteid" : [
"1."
],
"index.attributeid" : [ ],
"index.supplierid" : [ ],
"index.supplierloc" : [ ],
"index.catalogid" : [ ],
"index.price:value(RUB)" : 50.0,
"index.text:url(en)" : "transistor-1",
"index.text:name(en)" : "Transistor 1",
"index.text:content(en)" : [
"TMP0000001",
"Transistor 1"
],
"index.text:url(ru)" : "transistor-1",
"index.text:name(ru)" : "Transistor 1",
"index.text:content(ru)" : [
"TMP0000001",
"Transistor 1"
],
"index.text:url(zh)" : "transistor-1",
"index.text:name(zh)" : "Transistor 1",
"index.text:content(zh)" : [
"TMP0000001",
"Transistor 1"
],
"index.text:url()" : "transistor-1",
"index.text:name()" : "Transistor 1",
"index.text:content()" : [
"short test",
"Описание находится в очереди на редактирование",
"Transistor 1"
]
}
}
]
}
}
Code: Select all
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score" : 1.0,
"hits" : [
{
"_index" : "aimeos",
"_id" : "MHT-CpUBlisao1S-zZ-K",
"_score" : 1.0,
"_source" : {
"base" : {
"product.id" : "MHT-CpUBlisao1S-zZ-K",
"product.siteid" : "1.7.",
"product.ctime" : "2025-02-15 19:03:40",
"product.mtime" : "2025-02-19 07:15:38",
"product.editor" : "admin@radiodar.market",
"product.url" : "bss225h6327ftsa1-v-korpuse-god-vypuska-21-proizvodstva-kompanii-infineon-new-and-original",
"product.type" : "default",
"product.code" : "BIC0019571",
"product.label" : "BSS225H6327FTSA1 в корпусе год выпуска 21+ производства компании Infineon - new and original",
"product.status" : 1,
"product.dataset" : "",
"product.datestart" : null,
"product.dateend" : null,
"product.config" : [ ],
"product.scale" : 1.0,
"product.target" : "",
"product.ratings" : 0,
"product.rating" : "0",
"product.instock" : 0,
"product.boost" : 1.0
},
"product:has" : [
"catalog|default|15",
"price|default|_MHT-CpUBlisao1S-zZ-K_price_0",
"text|default|_MHT-CpUBlisao1S-zZ-K_text_0"
],
"catalog" : [
{
"product.lists.id" : "_MHT-CpUBlisao1S-zZ-K_catalog_default_15",
"product.lists.siteid" : "1.7.",
"product.lists.domain" : "catalog",
"product.lists.refid" : "15",
"product.lists.datestart" : null,
"product.lists.dateend" : null,
"product.lists.config" : [ ],
"product.lists.position" : 0,
"product.lists.status" : 1,
"product.lists.type" : "default"
}
],
"price" : [
{
"product.lists.id" : "_MHT-CpUBlisao1S-zZ-K_price_default_#0",
"product.lists.siteid" : "1.7.",
"domains" : [ ],
"product.lists.domain" : "price",
"product.lists.refid" : "_MHT-CpUBlisao1S-zZ-K_price_0",
"product.lists.datestart" : null,
"product.lists.dateend" : null,
"product.lists.config" : [ ],
"product.lists.position" : 0,
"product.lists.status" : 1,
"product.lists.type" : "default",
"price.id" : "_MHT-CpUBlisao1S-zZ-K_price_0",
"price.siteid" : "1.7.",
"price.type" : "default",
"price.currencyid" : "RUB",
"price.domain" : "product",
"price.quantity" : 1.0,
"price.value" : null,
"price.costs" : "0.00",
"price.rebate" : "0.00",
"price.taxvalue" : "0.0000",
"price.taxrates" : {
"tax" : "0.00"
},
"price.taxrate" : "0.00",
"price.taxflag" : true,
"price.status" : 1,
"price.label" : "RUB "
}
],
"text" : [
{
"product.lists.id" : "_MHT-CpUBlisao1S-zZ-K_text_default_#1",
"product.lists.siteid" : "1.7.",
"domains" : [ ],
"product.lists.domain" : "text",
"product.lists.refid" : "_MHT-CpUBlisao1S-zZ-K_text_0",
"product.lists.datestart" : null,
"product.lists.dateend" : null,
"product.lists.config" : [ ],
"product.lists.position" : 0,
"product.lists.status" : 1,
"product.lists.type" : "default",
"text.id" : "_MHT-CpUBlisao1S-zZ-K_text_0",
"text.siteid" : "1.7.",
"text.languageid" : null,
"text.type" : "long",
"text.label" : "Описание находится в очереди на редактирование",
"text.domain" : "product",
"text.content" : "Описание находится в очереди на редактирование",
"text.status" : 1
}
],
"domains" : [
"catalog",
"price",
"text"
],
"index.siteid" : [
"1.",
"1.7."
],
"index.attributeid" : [ ],
"index.supplierid" : [ ],
"index.supplierloc" : [ ],
"index.catalog" : [
{
"position" : 0,
"listtype" : "default",
"id" : "15"
}
],
"index.catalogid" : [
"15"
],
"index.price:value(RUB)" : 0.0,
"index.text:url(en)" : "bss225h6327ftsa1-v-korpuse-god-vypuska-21-proizvodstva-kompanii-infineon-new-and-original",
"index.text:name(en)" : "BSS225H6327FTSA1 в корпусе год выпуска 21+ производства компании Infineon - new and original",
"index.text:content(en)" : [
"BIC0019571",
"<span class=\"EzKURWReUAB5oZgtQNkl\">Electronic</span><span> </span><span class=\"EzKURWReUAB5oZgtQNkl\">components</span>",
"BSS225H6327FTSA1 в корпусе год выпуска 21+ производства компании Infineon - new and original"
],
"index.text:url(ru)" : "bss225h6327ftsa1-v-korpuse-god-vypuska-21-proizvodstva-kompanii-infineon-new-and-original",
"index.text:name(ru)" : "BSS225H6327FTSA1 в корпусе год выпуска 21+ производства компании Infineon - new and original",
"index.text:content(ru)" : [
"BIC0019571",
"<span class=\"EzKURWReUAB5oZgtQNkl\">Electronic</span><span> </span><span class=\"EzKURWReUAB5oZgtQNkl\">components</span>",
"BSS225H6327FTSA1 в корпусе год выпуска 21+ производства компании Infineon - new and original"
],
"index.text:url(zh)" : "bss225h6327ftsa1-v-korpuse-god-vypuska-21-proizvodstva-kompanii-infineon-new-and-original",
"index.text:name(zh)" : "BSS225H6327FTSA1 в корпусе год выпуска 21+ производства компании Infineon - new and original",
"index.text:content(zh)" : [
"BIC0019571",
"<span class=\"EzKURWReUAB5oZgtQNkl\">Electronic</span><span> </span><span class=\"EzKURWReUAB5oZgtQNkl\">components</span>",
"BSS225H6327FTSA1 в корпусе год выпуска 21+ производства компании Infineon - new and original"
],
"index.text:url()" : "bss225h6327ftsa1-v-korpuse-god-vypuska-21-proizvodstva-kompanii-infineon-new-and-original",
"index.text:name()" : "BSS225H6327FTSA1 в корпусе год выпуска 21+ производства компании Infineon - new and original",
"index.text:content()" : [
"Описание находится в очереди на редактирование",
"BSS225H6327FTSA1 в корпусе год выпуска 21+ производства компании Infineon - new and original"
]
}
}
]
}
}
Debian 12, PHP 8.3, Server 1 = Aimeos 2024.10.13, Server 2 = ES 8.17.1
life is full of many new and interesting things
life is full of many new and interesting things
Re: How to start index of importing items? (Elasticsearch)
The "index.catalogid" values is empty and that's the reason why the products are not shown in the frontend (or only after saving them in the admin backend). Can you please check two things:
1.) The version you are using must use the index manager here:
https://github.com/aimeos/ai-controller ... d.php#L486
2.) What's your current ES-related configuration under the "mshop" key in your ./config/shop.php?
1.) The version you are using must use the index manager here:
https://github.com/aimeos/ai-controller ... d.php#L486
2.) What's your current ES-related configuration under the "mshop" key in your ./config/shop.php?
That's normal because you didn't specify an order for the products so ES is returning what it finds first.ЕвгенияСемихова(ИПСемиховаЕ.А.) wrote: ↑21 Feb 2025, 07:05 UPD: now I opened this product (from the first output of the command for product 1), saved it without changing anything, and after that it appeared on the front of the site. I returned to the console and sent the withdrawal request again with the same command. Strangely, now it issues a completely different product under No. 1.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- ЕвгенияСемихова(ИПСемиховаЕ.А.)
- Posts: 67
- Joined: 11 Jan 2025, 09:45
Re: How to start index of importing items? (Elasticsearch)
1) this is my file from line #480:1.) The version you are using must use the index manager here:
https://github.com/aimeos/ai-controller ... d.php#L486
Code: Select all
protected function importProducts( \Aimeos\Map $products, array $data, array $mapping, array $types,
\Aimeos\Controller\Jobs\Common\Product\Import\Csv\Processor\Iface $processor ) : int
{
$items = [];
$errors = 0;
$context = $this->context();
$manager = \Aimeos\MShop::create( $context, 'index' );
foreach( $data as $code => $list )
{
$manager->begin();
try
{
Code: Select all
'mshop' => [
//start add for elasticsearch
'index' => [
'manager' => [
'name' => 'Elastic', // Only if products are not in DB
// 'name' => 'ElasticIndex', // If products exist in DB
'attribute' => [
'name' => 'Elastic',
],
'catalog' => [
'name' => 'Elastic',
],
'price' => [
'name' => 'Elastic',
],
'supplier' => [
'name' => 'Elastic',
],
'text' => [
'name' => 'Elastic',
],
]
],
//others line
// Only if products are not in DB
'product' => [
'manager' => [
'name' => 'Elastic',
'lists' => [
'name' => 'Elastic',
'type' => [
'name' => 'Elastic',
],
],
'property' => [
'name' => 'Elastic',
'type' => [
'name' => 'Elastic',
],
],
'type' => [
'name' => 'Elastic',
],
]
],
// Only if products are not in DB
'stock' => [
'manager' => [
'name' => 'Elastic',
'type' => [
'name' => 'Elastic',
],
]
],
//end of add for elasticsearch
'locale' => [
// 'site' => '<custom site code>', // used instead of "default"
//add marketplace
'manager' => [
'sitelevel' => 3
]
//end of Marketplace
]
],
Please tell me where I made a mistake.
Debian 12, PHP 8.3, Server 1 = Aimeos 2024.10.13, Server 2 = ES 8.17.1
life is full of many new and interesting things
life is full of many new and interesting things