Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Dhanesh Kumar MJ 158 posts 511 karma points c-trib
    Aug 01, 2021 @ 15:51
    Dhanesh Kumar MJ

    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 what are the best approaches to do?,please guide

    Regards Dhanesh ;)

  • Bjarne Fyrstenborg 1281 posts 3991 karma points MVP 7x c-trib
    Aug 01, 2021 @ 19:59
    Bjarne Fyrstenborg

    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:

    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 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.

  • Dhanesh Kumar MJ 158 posts 511 karma points c-trib
    Aug 02, 2021 @ 03:11
    Dhanesh Kumar MJ

    Thanks Bjarne.

    Going with custom index instead of updating content property, because the data needs to import on an interval basis.

    Regards Dhanesh ;)

Please Sign in or register to post replies

Write your reply to: