I am using following code to retrieve component by Title through core service in Tridion 2013 -
var compData = client.GetSearchResults(new SearchQueryData()
{
FromRepository = new LinkToRepositoryData() { IdRef="tcm:0-24-1" },//tcm id of publication
IsTitleCaseSensitive = false,
Title = "DemoComponent",//component title
SearchInSubtree = false,
ItemTypes = new ItemType[] { ItemType.Component},
SearchIn = new LinkToIdentifiableObjectData() { Title = "DemoFolder", IdRef = "tcm:24-3251-2" }//name and tcm id of folder in which component resides
});
This code returns null in compData instead of component, Am I missing something here ?