28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

When the business requirements change, only the search rule definition in the configuration object has to be<br />

changed, tested, and deployed. The interface to the database procedure that is called by the application stays<br />

unchanged. So without any change to the application code, the definition of the search rules is changed and the<br />

user immediately gets search results according to the new requirements. This results in much less effort and<br />

more flexibility when changing search rules.<br />

Supported Database Objects<br />

You can search on attribute views. The views have to be modeled using the <strong>SAP</strong> <strong>HANA</strong> studio and have to be<br />

stored as objects in the <strong>SAP</strong> <strong>HANA</strong> repository.<br />

Other database objects, such as row tables, column tables, calculation views, or analytic views, are not supported.<br />

Important Terms<br />

A search rule set is the configuration object that is stored in the <strong>SAP</strong> <strong>HANA</strong> repository and that contains the<br />

definition of the search rules. When the database procedure is called to do a search, a search rule set is executed.<br />

This means that all rules that are defined in the search rule set are executed.<br />

A search rule defines a condition when two records – the user input and a record in the database – are<br />

considered similar. Each rule in a search rule set is converted to a SELECT statement and is executed when the<br />

search rule set is processed.<br />

Creating Search Rule Sets<br />

You created a workspace and a project in the <strong>SAP</strong> <strong>HANA</strong> studio. In this workspace, you created a package that will<br />

contain your rule set.<br />

1. In the <strong>SAP</strong> <strong>HANA</strong> modeler, open the Project Explorer view and navigate to your package.<br />

2. From the context menu of your package, select New Other Search Rule Set .<br />

3. Enter a file name for your rule set. The file has to have the extension .searchruleset.<br />

4. Open and edit the search rule set in the search rule set editor. See Working with the Search Rule Set Editor<br />

[page 302]<br />

5. Define the attribute view, key columns, score selection parameter, stopwords, and term mappings. See<br />

Configuring Search Rule Sets [page 303]<br />

6. From the context menu of your package or search rule, choose Team Activate .<br />

You can now execute a search with the rule set. See Executing a Search With a Rule Set [page 304]<br />

Working with the Search Rule Set Editor<br />

● To open a rule set in the editor, double-click a rule set file or, from the context menu, select Open With<br />

Search Rule Set Editor .<br />

● To add new nodes, children or siblings, you can use the context menu of each node.<br />

For example, you can a new key column node in the following ways:<br />

○ Select the attribute view node and, in the context menu, choose New Key Column.<br />

○ Select a key column node and, in the context menu, choose New Key Column.<br />

● To delete a node from the search rule set, select the node and, from the context menu, select Delete.<br />

302<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Enabling Search

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!