Copied to clipboard

Flag this post as spam?

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


  • ffz 5 posts 25 karma points
    Nov 29, 2010 @ 15:52
    ffz
    0

    Examine doesnt index documents created by the API

    Hello Umbracians,

    I’ve got a problem that Examine doesn’t index documents created by the API.

    Code-example:

    DocumentType myPage = DocumentType.GetByAlias("Content");   

           

    Document doc = Document.MakeNew(

    "Content",

                myPage,

                User.GetUser(0),

                id

                );

    doc.PublishWithResult(User.GetUser(0));

    doc.XmlGenerate(new XmlDocument());      

    library.UpdateDocumentCache(doc.Id);

     

    Here I create the a Document also Use PublishWithResult (I tried just Plublish too) and in the Content tree the Document is show correctly as published but it doesn’t appear in the Examine index.

    When I do the same in the Backend it works. It seem the when I create a Document in the Backend oft umbraco there are some events triggered that the API-methods doesn’t trigger.

    Can anybody help?

    Thanks

    FFZ

  • 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