Copied to clipboard

Flag this post as spam?

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


  • Euan Rae 105 posts 134 karma points
    Mar 09, 2012 @ 16:01
    Euan Rae
    0

    Manually re-indexing a node in an Examine Index

    I am building a website that uses examine a lot for performance.  I have a situation where I want to get the data from 1 node (from the index), update a couple of fields from the database, and update the index with the new data.  This is working fine with custom indexes (ie, indexes generated from custom DB data), but when I try to manually re-index a node that is umbraco data, it just delete's the data for that node.  I've looked in the 'Queue' folder for the Index and all that appears is the .DEL file, instead of the .ADD and .DEL like normal.

    The code I'm using is

     

            protected void ReIndexNode(string indexType, Dictionary<string, string> dataSet, int id)
            {
                IndexProvider.ReIndexNode(
                    dataSet.ToExamineXml(id, indexType),
                    indexType
                );
            }

     

     

    where indexType='content'. dataSet is t he Dictionary of the updated data, and id is the node id

    Is there something I'm doing wrong?

    Any help would be greatly appreciated!

    Euan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies