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.

If the fuzzySimilarity is lower than 0.77, the token scoring will be part of the result score. If the fuzzySimilarity is<br />

higher than 0.77, the token scoring will not be considered, so the total scoring will be lower.<br />

SELECT TO_DECIMAL(SCORE(),3,2) AS score, id, companyname<br />

FROM companies<br />

WHERE CONTAINS(companyname, 'aktiv OR gesellschaft', FUZZY(0.75,<br />

'textSearch=compare'))<br />

ORDER BY score DESC, id;<br />

SCORE ID COMPANYNAME<br />

1 2 aktiv gesellschaft<br />

0.89 1 aktien gesellschaft<br />

SELECT TO_DECIMAL(SCORE(),3,2) AS score, id, companyname<br />

FROM companies<br />

WHERE CONTAINS(companyname, 'aktiv OR gesellschaft', FUZZY(0.80,<br />

'textSearch=compare'))<br />

ORDER BY score DESC, id;<br />

SCORE ID COMPANYNAME<br />

1 2 aktiv gesellschaft<br />

0.71 1 aktien gesellschaft<br />

11.3 Building Search Apps<br />

11.3.1 Introduction to the UI Toolkit for Info Access<br />

The UI toolkit for <strong>SAP</strong> <strong>HANA</strong> Info Access provides UI building blocks for developing browser-based search apps on<br />

<strong>SAP</strong> <strong>HANA</strong>. Such applications provide real-time information access and faceted search features for huge volumes<br />

of structured and unstructured text data.<br />

The toolkit enables a freestyle search of a <strong>SAP</strong> <strong>HANA</strong> attribute view, displaying and analyzing the result set. The<br />

toolkit provides UI elements (widgets) such as a search box, a result list with a detailed view, and charts for basic<br />

analytics on the result set. The widgets are interconnected and adapt in real-time to user entries and mouse-over<br />

(hover) selections.<br />

The toolkit is based on HTML5 and JavaScript libraries such as JQuery/JQueryUI, d3 (Data Driven Documents),<br />

and Tempo. The widgets use the <strong>SAP</strong> <strong>HANA</strong> Info Access HTTP service. You do not need an additional layer to run<br />

the UI; <strong>SAP</strong> <strong>HANA</strong> and a Web browser are sufficient. The toolkit is tested on Mozilla Firefox 17. It also runs on<br />

Microsoft Internet Explorer 9 in standard mode and Google Chrome.<br />

Along with the actual toolkit (the widgets), we deliver a fully operational demo Web app built using this toolkit. The<br />

demo app enables you to explore a search application dealing with a set of sample data for electronic products.<br />

You can use the demo app as a template or for reference when you start developing your own app.<br />

You can, for example, use the demo site to easily connect your own data and compose your Web site. To create a<br />

search application this way, it is sufficient to have experience in HTML and to have read this documentation. For<br />

308<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!