It's all about the answers!

Ask a question

How to search all the retired asset information


pan tianming (4765644) | asked Nov 19 '12, 9:32 p.m.
I used the following codes try to search all the retired assets in our RAM:
***************************************************
            RAMAssetQueryBuilder queryBuilder = new RAMAssetQueryBuilder(session);
            RAMState state = session.getState("Retired");            
            queryBuilder.addSearchFilter(state);
            SearchResult searchResult = session.getAssets(queryBuilder);                   
          AssetSearchResult[] assetResults = searchResult.getAssetSearchResults();
          for(int i=0;i<assetResults.length;i++){
          AssetSearchResult aresult = assetResults[i];
          aresult.getAsset().getIdentification();
          }
********************************************************
In RAM UI, the total retired assets number is 208 . My testing result like this:
1) AssetSearchResult[] assetResults  its length is always 100
2) searchResult.getTotalResultsCount() number can be 208, but how to get these assets id and version?
3) If I set the max search result as a very big number like following codes:
queryBuilder.setMaxResults(100000000);          
Then assetResults.length  can be 208. But is the default max result is 100? How we set it as no limit?
4) The strange thing is the result number is not fixed, one time I get 208 results and next time is 210.
In our RAM server the assets not changed and I  tested 6 times with above codes, half of them the
searchResult.getTotalResultsCount()  shows as 208 correct value, but the other 3 times is 210.

We are using RAM 7511 java API right now, is there any change?

One answer



permanent link
pan tianming (4765644) | answered Nov 27 '12, 3:32 a.m.
I get the problem now, it is because our RAM cluster has two server, each one have different search result.

Comments
Gili Mendel commented Nov 27 '12, 1:35 p.m.
JAZZ DEVELOPER

Why is that ... are both indexers working?

Your answer


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.