Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to search all the retired asset information

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?

0 votes



One answer

Permanent link
I get the problem now, it is because our RAM cluster has two server, each one have different search result.

0 votes

Comments

Why is that ... are both indexers working?

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,023

Question asked: Nov 19 '12, 9:32 p.m.

Question was seen: 4,896 times

Last updated: Nov 27 '12, 1:35 p.m.

Confirmation Cancel Confirm