Joined: 9/22/2009 Posts: 2
|
Hi all,
please look at the code below. I get exactly the results I want but they are displayed twice...
string keyword = Request.QueryString["keyword"];
Ektron.Services.SearchManager searchManager = new Ektron.Services.SearchManager();
ContentSearchCondition csc1 = new ContentSearchCondition(); csc1.setType = Ektron.Cms.Common.EkEnumeration.SearchType.EQUAL; csc1.setValue = "Product"; csc1.setVariable = "customproperties.Content_Type";
ContentSearchCondition csc2 = new ContentSearchCondition(); csc2.setType = Ektron.Cms.Common.EkEnumeration.SearchType.LIKE; csc2.setValue = keyword; csc2.setVariable = "Content.content_html";
ContentSearchCondition csc3 = new ContentSearchCondition(); csc3.setType = Ektron.Cms.Common.EkEnumeration.SearchType.LIKE; csc3.setValue = "2067"; csc3.setVariable = "Content.content_language";
ContentSearchCondition csc = new ContentSearchCondition(); csc.setType = Ektron.Cms.Common.EkEnumeration.SearchType.AND; csc.AddCondition(csc1); csc.AddCondition(csc2); csc.AddCondition(csc3);
ContentData[] cd = searchManager.ExecuteSearch(csc); for (int i = 0; i < cd.Length; i++) { content.Text += cd[i].Title + "<br/>"; }
You find a screenshot of the results in the attachment.
Thanks a lot,
Thijs
File Attachment(s):
ScreenShot084.jpg (45201 bytes)
|
Joined: 7/10/2006 Posts: 1125
|
Thijs,
This is deprecated api. use new search api, see samples in developer starter site. Rashmi-
|