Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8990

How to get the KM resource file Size and Document Relevance (%) by using webdynpro JAVA.

$
0
0

Hello Friends,

 

How to get the KM resource file Size and Document Relevance (%) by using webdynpro JAVA.

 

I got remaining all information from the KM Resource file (like filename, description, date& time and username), without these two field name.

 

I developed below code.

 

IUser serviceUser = (IUser)WPUMFactory.getServiceUserFactory().getServiceUser(Admin_Service_User);

resourceFactory = ResourceFactory.getInstance(); 
resourceContext = new ResourceContext(serviceUser);


IIndexService indexService = (IIndexService) resourceFactory.getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);

IFederatedSearch federatedSearch = (IFederatedSearch) indexService.getObjectInstance(IWcmIndexConst.FEDERATED_SEARCH_INSTANCE);
   
List actIndexList = indexService.getActiveIndexes();

Hashtable searchParameters = new Hashtable();
searchParameters.put(SearchParamConst.PARAM_SEARCH_TERM, str_search_term);
searchParameters.put(SearchParamConst.PARAM_SEARCH_ACTION, SearchParamConst.ACTION_EXACT);
SearchQueryListBuilder sqlb = new SearchQueryListBuilder(searchParameters);

IQueryEntryList qel = sqlb.buildSearchQueryList();

ISearchSession session = federatedSearch.searchWithSession(qel, actIndexList,resourceContext); 
ISearchResultList results = session.getSearchResults(1, session.getTotalNumberResultKeys());


ISearchResultListIterator iter = results.listIterator();

while (iter.hasNext()) {
ISearchResult result = iter.next();
IResource resource = result.getResource();

 

IPrivateKMsearchView.ISearchResultElement srcResults = wdContext.createSearchResultElement();

 

srcResults.setResName(resource.getDisplayName());
srcResults.setFileDiscription(resource.getDescription());

 

wdContext.nodeSearchResult().addElement(srcResults);

}

 

 

Please advise me, how to get these two fields data.

Please check attached screen shoot also for your reference for these two fields.

 

Regards

Vijay Kalluri


Viewing all articles
Browse latest Browse all 8990

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>