Copied to clipboard

Flag this post as spam?

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


  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 26, 2010 @ 16:27
    Jeroen Breuer
    0

    Recursive documents

    Hello,

    I need to go throught documents recursivly (finding a parent of a certain documenttype). I can't do it through nodes because the document might not be published. What is the best way to do this? Create a recursive method which get's the parent of a Document until I find the correct DocumentType? Seems pretty database intensive...

    Jeroen

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 26, 2010 @ 16:30
    Ismail Mayat
    1

    Jeroen,

    What version of umbraco u using if latest then linq2umbraco is the way you could then write query to do it or you could put together a lucene search on the internal index which will be lightening quick.

    Regartds

    Isamil

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 26, 2010 @ 16:36
    Jeroen Breuer
    0

    I'm using 4.5, but Linq2Umbraco won't work since it only works on published nodes. Using lucene might be a good solution. Can it also search unpublished nodes?

    Jeroen

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 26, 2010 @ 16:53
    Ismail Mayat
    0

    Jeroen,

    Yes it can if the index has been setup to contain unpublished nodes and by default on internal index you have

      supportUnpublished="true"

    Regards

    Ismail

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 26, 2010 @ 16:57
    Jeroen Breuer
    0

    Thanks. Will give it a try :).

Please Sign in or register to post replies

Write your reply to:

Draft