JSONADM API - New Product - Not Rebuild Index
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
JSONADM API - New Product - Not Rebuild Index
Hi there,
I am currently using AIMEOS Laravel version 7.2020, and JSONADM API
I am trying to figure out how to manage the products and catalog relationship using JSON API via catalog.lists table
Here are the steps to reproduce:
- Create new product
- Get the Id of new product to create a catalog.list with existing Catalog (add the product to catalog when calling API)
With these steps all the API work fine except the index of catalog is not rebuild. That make the product not available to the front end via the JSON API
I already investigated this post, seem the core is already fixed , but i couldnt make it
JSONADM API and rebuild index
post11064.html
PS: Is it okay to manually add and remove product via the catalog.lists resource? Is there any potential problems behind that?
thank you very much for your time
I am currently using AIMEOS Laravel version 7.2020, and JSONADM API
I am trying to figure out how to manage the products and catalog relationship using JSON API via catalog.lists table
Here are the steps to reproduce:
- Create new product
- Get the Id of new product to create a catalog.list with existing Catalog (add the product to catalog when calling API)
With these steps all the API work fine except the index of catalog is not rebuild. That make the product not available to the front end via the JSON API
I already investigated this post, seem the core is already fixed , but i couldnt make it
JSONADM API and rebuild index
post11064.html
PS: Is it okay to manually add and remove product via the catalog.lists resource? Is there any potential problems behind that?
thank you very much for your time
Re: JSONADM API - New Product - Not Rebuild Index
The index should be rebuilt if you use POST or PATCH for the "catalog" endpoint with relationships:
https://github.com/aimeos/ai-admin-json ... #L447-L454
PATCH Example:
See also: https://aimeos.org/docs/latest/admin/js ... eate-items
The index won't be rebuilt if you change the "catalog/lists" resource directly.
https://github.com/aimeos/ai-admin-json ... #L447-L454
PATCH Example:
Code: Select all
"data": {
"id": "12",
"type": "catalog",
"attributes": {
},
"relationships": {
"product": {
"data": [{
"id": "123",
"type": "product",
"attributes": {
"catalog.lists.type": "promotion",
"catalog.lists.config": {},
"catalog.lists.refid": "123",
}
}]
}
}
}
}
The index won't be rebuilt if you change the "catalog/lists" resource directly.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: JSONADM API - New Product - Not Rebuild Index
Thank you for your replying,
How about the Delele method?
As I want to delete the relationship between catalog and product?
If I just delete the catalog.list endpoint is there any potentital problems or there is any way to safely make it
How about the Delele method?
As I want to delete the relationship between catalog and product?
If I just delete the catalog.list endpoint is there any potentital problems or there is any way to safely make it
Re: JSONADM API - New Product - Not Rebuild Index
Deleting product references using the "catalog/lists" endpoint doesn't update the index at the moment:
https://github.com/aimeos/ai-admin-json ... #L507-L530
We will see how we can fix that.
https://github.com/aimeos/ai-admin-json ... #L507-L530
We will see how we can fix that.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: JSONADM API - New Product - Not Rebuild Index
AsI saw on the Aimeos Version 10.2020 laravel has a new JSON Adm API endpoint Index, which I did not find any related documentations yet,
Could you help me brieftly explain, what Index is used for?
And is it okay for me to solve the delete method above by Manually delete both the catalog.list and Index-catalog through the api. Will it affect the Index for JSON api
Thank you for your help
Could you help me brieftly explain, what Index is used for?
And is it okay for me to solve the delete method above by Manually delete both the catalog.list and Index-catalog through the api. Will it affect the Index for JSON api
Thank you for your help
Re: JSONADM API - New Product - Not Rebuild Index
Yes, you can use it to update the index, esp. using the DELETE method is very handy to remove products from the index. You can also rebuild the index for specific products. Just pass the product IDs using the "id" parameter to both methods:
https://github.com/aimeos/ai-admin-json ... andard.php
https://github.com/aimeos/ai-admin-json ... andard.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: JSONADM API - New Product - Not Rebuild Index
Could you please shortly explain the Logic of Index in the Aimeos system?
As i understand now, it is used to get the list of products which are available for customer without login. And it is used for Aimeos system to operating for searching and filtering.
Is there any notices when modify
If I manually delete index as above? Do I mess up anything under the hook of the system?
Thank you for your fast response
As i understand now, it is used to get the list of products which are available for customer without login. And it is used for Aimeos system to operating for searching and filtering.
Is there any notices when modify
If I manually delete index as above? Do I mess up anything under the hook of the system?
Thank you for your fast response
Re: JSONADM API - New Product - Not Rebuild Index
The index is used for searching and filtering for the frontend and also used for displaying products in all list views.
You can update the index using the JsonAdm endpoint. The only thing you can do wrong is to delete products from the index but not from the categories. Then, the products will get into the index again when a full index rebuild is done.
You can update the index using the JsonAdm endpoint. The only thing you can do wrong is to delete products from the index but not from the categories. Then, the products will get into the index again when a full index rebuild is done.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: JSONADM API - New Product - Not Rebuild Index
In which cases the index is rebuild?
Will it rebuild the index everytime i modify the Index through JSON ADM Api ?
If yes will that affect the performance of system?
Will it rebuild the index everytime i modify the Index through JSON ADM Api ?
If yes will that affect the performance of system?
Re: JSONADM API - New Product - Not Rebuild Index
The complete index is only rebuilt if you execute the "index/rebuild" job from the command line.
Using the JsonAdm API with DELETE or POST, only the product is updated in the index. Thus, the performance of the system won't be affected much by the index update.
Using the JsonAdm API with DELETE or POST, only the product is updated in the index. Thus, the performance of the system won't be affected much by the index update.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star