Bring out the benefits of Web Client Record Search of IT Asset Manager

As an asset manager you understand that the average or casual user most commonly logs onto the system and then performs a search. The user is looking for an asset, a portfolio item, a contract or a request line. This was a more difficult challenge in the past, before system administrators created such a starting point for us (or for our role). Previously is was hard   to navigate and get the information we needed.

 

For users the requirement is simple: Let’s say I have a name or code in hand and I am not crystal clear which screen I should go to in the system. How would you help me solve my dilemma?

 

Today, I am going to share with you all the details and tips about “Record Search”, a smart, full text search functionality introduced in the Web Client of HP Asset Manager 9.40. It was developed to solve the challenges associated with the user search and offers great flexibility and performance!

 

      I.        Prerequisites for Record Search

  1. You have a running Asset Manager Web Tier instance on machine m1
  2. You have a running Asset Manager Web Service instance on machine m2
  3. A machine (e.g. m3) that has aamapi94.dll (or libaamapi94.so under Linux) and connectivity to AM database

Note: m3 can be the same one as m2 but let’s use a standalone machine to get the full flexibility.

  1. All the machines above are within same domain e.g. example.com that can construct the FQDN (full qualified domain name) like m1.example.com, m2.example.com and m3.example.com

Note: Due to nature of LWSSO, you cannot use IP addresses directly when connecting the applications. So if you just set up AM web as demo on localhost, remember to open and edit your hosts file and add alias of 127.0.0.1 localhost.localdomain.com

 

 

     II.        Installing Record Search application on m3

  1. Open and edit <Asset Manager installation folder>\websvc\quicksearch.properties.

Note: You will find the file is very similar to the package.properties which is used for Web Service. This means you can copy-and-paste all of the connection strings to save time. And the explanation of all parameters in quicksearch.properties can be found on page 90-93 of HP Asset Manager Installation and Upgrade

  1. Change the value of AssetManager.RecordSearchIndexDir=c:/index if you want to persist the search index at different folder on your disk (must have write-permission to it).
  2. Change the value of AssetManager.ServiceTag=Head if your Web Service uses a tagged one.
  3. Change and remember the value of LWSSO.domain=asiapacific.hpqcorp.net to example.com or localdomain.com mentioned above.
  4. Change and remember the value of LWSSO.userNameHeaderName=SM_USER
  5. Change and remember the value of LWSSO.initString=lwsso-shared-encryption-key
  6. Go to <Asset Manager installation folder>\deploy and run deploy.bat ..\websvc\quicksearch.properties
  7. Copy <Asset Manager installation folder>\websvc\quicksearch.war to the webapps subfolder of the Tomcat installation folder on m3.

Note: If you have deployed the .war file previously, you need to delete the existing .war file and the sub-folder with the same name before copying the .war file to the webapps folder.

  1. Start/Restart Tomcat on m3.
  2. Wait for the application to start and monitor the AssetManager.RecordSearchIndexDir location, when you see files are generated inside e.g. treeAndNo.gz, this indicates that your Record Search application is successfully connected to AM database and it has been indexed!

Note: There are two more steps to make it integrated with AM Web Client and UI. Please continue to read the Section III of the article.

 

 

    III.        Configure LWSSO integration and Display Search box in Web Client

  1. Enable Asset Mamanger SSO. To do this, perform the following steps:
    1. Go to the following URL: http://<Name or IP address of the Asset Manager Web Service server>:<Asset Manager Web Service port>/AssetManagerWebService/ssoConfig.jsp

For example: http://m2.example.com:<tomcat port>/AssetManagerWebService/ssoConfig.jsp

  1. Select the check box for Enable LW-SSO framework, and then fill in the Domain name, Shared encryption key, and Request header key containing the user name fields as you set in c,d and e of Section II.
  2. Restart Tomcat on m2.
  3. Display Search box in Web Client
    1. Stop Tomcat on m1
    2. Open and edit webapps\AssetManager\web.xml
    3. Find and replace the following two values as follow

Congratulations! You are almost done! Open and log in to Asset Manager Web Client again and you will find a new search box on top the banner!

 

 

   IV.        Using Record Search

  1. Type keywords in the Find a record field, and then press Enter or click the search button.
  2. A new browser window then opens and displays the search results.
  3. Click a search result to view the details of the record.
  4. A new browser window opens and displays the details of the record.

Note:

  • The search results a user can see are limited to the content the user is authorize to access. Therefore, the search results for different users vary even if they use the same

keyword.

  • Record Search currently only supports western languages.
  • It is not recommended to use Record Search in a multi-tenant environment.

 

    V.        Q&A

Q1: Is Record Search limit to specific tables?

A1: Yes, by default we don’t add all OOTB tables in the index list, but you can define which tables can be scanned by the index engine in quicksearch\WEB-INF\classes\indextables.txt. Just edit this file and restart tomcat for the changes to take effect. And theoretically, you can add any table—including your customized ones.

 

Q2: Why do we need LWSSO for QuickSearch? Can I use it directly via its own tomcat?

A2: Quick search is a separate web application from AM Web Client. So, we use LWSSO between them to make it single-sign-on, because only by this way, your authorization information is passed and thus the engine is able to narrow down to your search. You have to use the AM web client to start your search.

 

Q3:What does the index files do under C:\index ?

A3: Index is a common concept for most of the search engine, the contents in index file can be simply described as words and their location in database, when searching any key words in quicksearch. We can locate the records which match the giving keywords by the bound location info in index. This search is much fasterthan the traditional SQL query which might require full table scan.

 

Q4: Can I use search pattern and is there any rules to obey?

A4: Record Search is based on Lucene – a full text search engine. The full supported syntax is actually derived and can all be found at http://lucene.apache.org/core/3_1_0/queryparsersyntax.html

Give some examples:

  • AND /OR are reserved keywords that don’t take part in search
  • Searching for 'hp', records that contain 'hp' will be displayed
  • Searching for 'hp demo', records that contain either 'hp' or 'demo' will be displayed
  • Searching for 'hp and demo', 'and' will be used as operator, so records that contain both 'hp' and 'demo' will be displayed

 

 

I hope that I have cleared up any confusion surrounding Record Search and how to set it up. If your organization is looking for a full text search engine for Asset Manager, you don’t have build it on your own. Our Record Search has been tuned to optimize your search with Asset Manager! Don’t wait any more, try it out NOW!

 

Comments
Walkley(anon) | ‎04-16-2014 06:55 PM

Great.

 

Just one suggestion to add another import parameter in your blog, AssetManager.CronConfig in quicksearch.properties. This parameter is used to set the frequency for index rebuilding, the detail format is same as the UNIX cron expressions: http://en.wikipedia.org/wiki/Cron.

 

And as the index was built periodically, users can not expect that Record Search as an real time search engine.

403tech(anon) | ‎04-28-2014 03:39 AM

wow nice post, espacially the question answer part. Very informative.Thanks for sharing.

Leave a Comment

We encourage you to share your comments on this post. Comments are moderated and will be reviewed
and posted as promptly as possible during regular business hours

To ensure your comment is published, be sure to follow the Community Guidelines.

Be sure to enter a unique name. You can't reuse a name that's already in use.
Be sure to enter a unique email address. You can't reuse an email address that's already in use.
Type the characters you see in the picture above.Type the words you hear.
Search
Showing results for 
Search instead for 
Do you mean 
About the Author
I have been working at HP AM R&D for more than 7 years. I led the transition of the product and now I am one of the R&D Managers driving tra...
Featured


Follow Us
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.