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.

Option similarCalculationMode<br />

The option similarCalculationMode controls how the similarity of two strings (or, for TEXT attributes, terms) is<br />

calculated.<br />

Score calculation modes<br />

Basically, the similarity of two strings is defined by the number of common characters, wrong characters,<br />

additional characters in the search string and additional characters in the reference string.<br />

There are the following calculation modes:<br />

Table 12: Modes<br />

Mode Impact on wrong<br />

characters<br />

Impact on additional<br />

characters in search<br />

search high high low<br />

compare (default) moderate high high<br />

symmetricsearch high moderate moderate<br />

Note that high impact results in a lower score.<br />

Table 13: Examples with score<br />

Request Reference Compa<br />

re<br />

Search Symmetricsearch<br />

search searching 0.76 0.96 0.86<br />

search search 0.85 0.75 0.75<br />

search searchingforextrater<br />

searchingforextrater<br />

restriallife<br />

searchingforextrater<br />

restriallife<br />

searchingforextrater<br />

restriallife<br />

SQL Examples<br />

Preparations<br />

restriallife<br />

0.0 0.91 0.87<br />

searching 0.0 0.35 0.84<br />

search 0.0 0.24 0.79<br />

searchingforthemea<br />

ningoflife<br />

0.6 0.57 0.6<br />

OP TABLE test_similar_calculation_mode;<br />

CREATE COLUMN TABLE test_similar_calculation_mode<br />

(<br />

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

Enabling Search<br />

Impact on additional<br />

characters in table<br />

P U B L I C<br />

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

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

Saved successfully!

Ooh no, something went wrong!