It's all about the answers!

Ask a question

Searching URL artifact using Java API


Pramod Chavan (191620) | asked Nov 08 '14, 9:24 a.m.
 Hello,

I am unable to get RAM URL artifact in the search result using the java api.
If I search using the URL title ("RAM Automation Test" in below screenshot), I get the correct result. But if I search for the URL value, RAM search is returning no result.
 
Is it possible to search for the link instead of title?

Please advise.
URL artifact  
I tried the same thing as mentioned in the RAM help doc, as shown in below code snippet-
 RAMAssetQueryBuilder query = (RAMAssetQueryBuilder)session.createAssetQuery("text that would be in my artifact");
		query.setSearchModes(SearchQuery.SEARCH_WITHIN_ARTIFACTS_FLAG);
		
		SearchResult result = session.getAssets(query);

		AssetSearchResult[] results = result.getAssetSearchResults();
		
		asset = (RAMAsset)results[0].getAsset();
		
		ArtifactSearchResult[] artifactResults = results[0].getMatchingArtifacts();
		
		RAMArtifact artifact = (RAMArtifact)artifactResults[0].getArtifact();
	

Comments
Pramod Chavan commented Nov 11 '14, 5:45 a.m.

Any comments or suggestions? 

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.