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 135 karma points
    Mar 06, 2012 @ 11:48
    Euan Rae
    0

    Using examine to index custom db tables

    Hi,

    I'm trying to use examine to index a custom db table.  I have created a custom Indexer class inheriting from LuceneIndexer, I've implemented 2 classes: "protected override void PerformIndexAll(string type)" and "protected override void PerformIndexRebuild()".

    In PerformIndexRebuild() I have got as far as creating 1 record (from another post that touched on the subject http://our.umbraco.org/forum/developers/extending-umbraco/22204-Examine-custom-indexer)

     

    var sds = new SimpleDataSet
                              {
                                  NodeDefinition = new IndexedNode(),
                                  RowData = new SerializableDictionary<string, string>()
                              };
                sds.NodeDefinition.NodeId = 1;
                sds.NodeDefinition.Type = "groupdId";
                sds.RowData.Add("groupName", "Sector Reports");
                sds.RowData.Add("groupItemsPerPage", "2");
                sds.RowData.Add("groupOnFeed", "0");
    // add the sds to some type of list here ???

     

     

    The issue is I don't know how to add it to the list that will ultimately used to be create the index.

    Also, as this index has nothing to do with umbraco data, when will the function to re-index be called?  And what is the difference between the PerformIndexAll and PerformIndexRebuild functions?

    Thanks,

    Euan

Please Sign in or register to post replies

Write your reply to:

Draft