Using Ram java api to search assets with attributes
Hi all,
How can we search assets with java api by using custom attributes we created for assets?
For example lets say i have an asset asset1 and it has a an attriubte named "attribute1" rather than default attributes.
I tried following code but it didnt work, it cant find assets.
SearchQuery query = session.createAssetQuery("name:(" + assetName+ ") attribute1:(" + attrvalue+ ")");
Any suggestions?
thanks.
Accepted answer
You would use the same query that works on the host. For example the search on the host would be:
name:(asd) attribute:('abc'='qxr')
name:(asd) attribute:('abc'='qxr')