1

For cache purpose we're querying some Keywords based on Category WebDAV on application start. In Tridion 2011 following code used to achive this and worked well:

_coreService.GetSearchResults(new SearchQueryData { 
      ItemTypes = new[] { ItemType.Keyword },
      SearchIn = new LinkToIdentifiableObjectData { WebDavUrl = categoryWebDav } })
  .Select(k => k as KeywordData).ToArray();

However when we upgraded our Tridion 2011 to Tridion 2011 SP1 that piece of code doesn't work anymore and returns empty array for some reason.

So, is there way to fix this method to make it works as before or maybe there are some alternative way getting this? Please note that only IdentifiableObjectData array as return value is applicable.

  • 2
    Does search work at all? Can you find items that were created before update? I believe all you need to do is to reindex the search database – Andrey Marchuk Oct 15 '14 at 9:43
  • Also, why do you use search instead of doing GetList on category? – Andrey Marchuk Oct 15 '14 at 12:53
  • Yes, you are right. Search doesn't work well even in Tridion CMS. Unfortunately we don't have access to tridion server and guys who support it said that they reindexed cm database, but it didn't help. – Vitaliy Oct 15 '14 at 13:01
  • Regarding second comment, I tried something like that: core.GetList(categoryTcm, new KeywordsFilterData()), but it returns an exception: Unexpected list type: Tridion.ContentManager.Data.ContentManagement.KeywordsFilterData.. However, GetListXml works well – Vitaliy Oct 15 '14 at 13:04
  • The exception you mention was thrown on 2011, on 2013SP1 it will work fine – Andrey Marchuk Oct 15 '14 at 13:23
1

Does search work at all? Can you find items that were created before update? I believe all you need to do is to reindex the search database.

On a separate note, it's better to do GetList on category, instead of using search.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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