Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I am working with a legacy R5.3 GA based environment and I have a requirement to retrieve all the components which are published to a specific target and also filtered based on a schema.

I have written a custom code using TOM API (optimized it as per best of my knowledge) to do this task, however, the real problem is that there are millions of components and out which more then 50 K components are the result of the filtered query. Since It is older configuration hardware the result is taking more than 6 hours. (And this too sometime gives different result). Is there any other possible faster and consistent way to retrieve this. Specifically, I am looking for a SQL query on Tridion Database which can give this result.

share|improve this question
    
That's not a requirement... that's a proposed solution. What problem are you trying to solve? –  Dominic Cronin Jul 8 at 7:04
    
Apologies Dom if my question was not clear. I just wanted to share the context. I am just looking from experts if there is any other geek way to implement the requirement which could be more faster. If not, is it possible to have a SQL query which can be run directly on the Tridion DB to get the result (it may be slower but faster than API and will be consistent I guess) –  Pankaj Gaur Jul 8 at 7:17
    
Is this a one-off query to generate a one-time report, or do you need to do this over and over? –  Nickoli Roussakov Jul 8 at 10:14
    
@Nick: One time query :) –  Pankaj Gaur Jul 8 at 10:25
    
You're on an older setup but with today's technology. So it's not just "How would you do it without Tridion?" but also how would you do this today (cloud instances, database tools, scripts, etc.)? –  Alvin Reyes Jul 8 at 13:13
add comment

2 Answers 2

up vote 4 down vote accepted

I would look at the published data instead of getting it from the CM.

Drop something like this on a .jsp or .aspx or whatever it is you use in your staging environment:

ItemTypeCriteria componentCriteria = new ItemTypeCriteria(16);
Query q = new Query(CriteriaFactory.And(new Criteria[] { componentCriteria }));
SortParameter sortParameter = new SortParameter(SortParameter.ITEMS_TITLE, SortParameter.ASCENDING);
q.addSorting(sortParameter);
String[] componentResults = q.executeQuery();

And there you go, a list of published components at your fingertips.

PS - This code was written for 2011, it will likely not work in 5.3 (I think you only have SearchFilter as the query mechanism), but the principles are similar.

share|improve this answer
    
Thanks Nuno for the suggestion! –  Pankaj Gaur Jul 8 at 11:27
add comment

Nuno gave the "fry" (in delivery) answer so here are the other two.

Content Manager

The R5.3 User Manual describes Advanced Search's Publish status as

The Publish status option searches for published or not published items, selected using a drop down menu. Using the publish state search feature will return only Components, Component Templates, and Pages.

The Business Connector was the precursor to the Core Service. Bart Koopman even describes the Core Service with it's Marketing/Business name: "Business Connector 2.0" in his post on integrations.

Render / Publish

A quick and simple hack at finding information is using the TOM API as you have, but in template code.

I wouldn't suggest this for regular reporting, but you could get item XML which includes <isPublished> node. I have simple code examples for XSLT (per-item) and C#.

Both approaches deal with baking (in the Content Manager versus during Render/Publish). So just check the "oven." :-)

share|improve this answer
    
Thanks for the answer Alvin.We have to omit the Advanced search option due to two reason: 1) It can not search on the basis of published to a specific target 2) The varity index are not reliable and in some cases can give you inconsistent results - Known issues with VF –  Pankaj Gaur Jul 8 at 13:18
    
Sure, in R5.3 you couldn't search on items published to a specific target. Though if not against a Live site, you could unpublish everywhere else first. Otherwise start by having everything that's published, published everywhere and then removing unwanted items. What's the known issue with Verity? I recall occasional issues with the search index getting out of sync (mostly when scripting new content), but there was/is a re-index script/tool. –  Alvin Reyes Jul 8 at 13:40
    
Yes Alvin, what you said makes sense, but this approach will not be acceptable by the client considering the millions of components are there. Verity usually gives inconsistent result while there are search index are out of sync and re-indexing them is a time consuming task which will also not guarantee of 100% resolution –  Pankaj Gaur Jul 8 at 13:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.