Welcome close

We've made some changes!

As you may have noticed, we've made some changes to the DevCenter to include the new Exchange site, a code community for Ektron developers. You may use the same username and password to login for both the Exchange and DevCenter. Your DevCenter profile has moved over to the Exchange site. You also may notice we have removed some profile functionality in favor of new functionality, including Activity Streams. We welcome your feedback about the site on the Exchange forum.

SEARCH : searchSite
This SectionSite Wide
esync 

RSS Feed Print Category View
Searching for metadata gives double results
Thijs
Posted: Friday, January 29, 2010 4:01 AM
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)

EktronRashmi
Posted: Friday, January 29, 2010 9:48 AM
Joined: 7/10/2006
Posts: 1125


Thijs,

 This is deprecated api. use new search api, see samples in developer starter site.


Rashmi-
 

Jump to different Forum... 






Register for Synergy 2010

Articles
Design without Borders, yet with Structure
CMS400.NET and Adobe Flex
GeoMapping
EkML Ektron Markup Language
Taxonomy

[First] [Previous] [Next] [Last]


See All Articles