Another option is to create a document type based on this data source, e.g. a Product document type and create/update properties on this node based on the external data using ContentService. However be aware that each time the node is saved it will create a new version. You can use a package like UnVersion to cleanup older versions https://our.umbraco.com/packages/website-utilities/unversion/ or e.g. compare the specific properties on the node with the external data to check if it need to update/save the node again. For example it the values in the specific properties on the node are identical with the external data, you probably don't need to save the node.
Furthermore you could also store the data in a custom database table or store the data as JSON file(s) in a folder on the disk.
What are the best approaches to index custom data in Umbraco v8?
We have a requirement to include some external data from an API endpoint to umbraco index.so what are the best approaches to do?,please guide
Regards Dhanesh ;)
Hi Dhanesh
You have a few options to include/import custom data to Umbraco.
You can use Examine to create a custom Lucene index, which is useful if you also need to search/filter these data. Here is an example hos to create a custom index: https://our.umbraco.com/Documentation/Reference/Searching/Examine/indexing/#productindexcreator
Another option is to create a document type based on this data source, e.g. a Product document type and create/update properties on this node based on the external data using ContentService. However be aware that each time the node is saved it will create a new version. You can use a package like UnVersion to cleanup older versions https://our.umbraco.com/packages/website-utilities/unversion/ or e.g. compare the specific properties on the node with the external data to check if it need to update/save the node again. For example it the values in the specific properties on the node are identical with the external data, you probably don't need to save the node.
Furthermore you could also store the data in a custom database table or store the data as JSON file(s) in a folder on the disk.
Thanks Bjarne.
Going with custom index instead of updating content property, because the data needs to import on an interval basis.
Regards Dhanesh ;)
is working on a reply...