5.05.2010

FAST Admin Service

I am doing integration between FAST and Umbraco, and consider to decouple the FAST configuration and CMS environment.

Before go to do that I must find out a way to collect administration information from FAST. That is lucky that FAST do provide several web service to provide administration service.

It’s really simple to use the service. usually the admin service is locate at port 16089 and you can just reference the service as “http://host:16089/adminserver/servicename.jws”. and than you can use it as normal web service.

   1: FastAdminPresentationService.PresentationService ps = new FastAdminPresentationService.PresentationService();


   2: CredentialCache cc = new CredentialCache();


   3: cc.Add(new Uri("http:hostname:16089/adminserver/servicename.jws"),"Basic",new NetworkCredential("adminname", "adminpassword"));


   4: ps.Credentials = cc;




Following is the service I using and tested.



CollectionService.getCollectionNames <—get the collection names



IndexProfileService.getClusterNames() <—as name



IndexProfileService.getDeployedIndexProfile(ClusterName) <—get index profile xml



Get Search Profiles:





   1: FastAdminSearchProfilesService.SearchProfileRetrieveFilter filter = new FastAdminSearchProfilesService.SearchProfileRetrieveFilter();


   2: FastAdmiTest.FastAdminSearchProfilesService.SearchProfile[] list = sps.retrieveSearchProfiles(null, false, false, false);






Get the Navigators inside special Search Profile:



First, get the SearchProfile and keep the SearchProfile .publishedViewName, and then Reference PresentationService and get the navigator by publishedViewName as



Navigation navigation = ps.retrieveNavigation(the publishedViewName that we keeped);



Then, the navigation.navigators are what we want to have. If you want the list the same with the Admin Site UI showing, choice the navigators with blocked property be false.

No comments: