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...
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.
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?
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
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
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
Jeroen,
Yes it can if the index has been setup to contain unpublished nodes and by default on internal index you have
Regards
Ismail
Thanks. Will give it a try :).
is working on a reply...