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.

SCORE ID COMPANYNAME<br />

0.88 6 xabc<br />

0.75 3 abx<br />

0.59 3 xbc<br />

0.59 4 axc<br />

How do I find out if the fuzzy search index is enabled for column x?<br />

See Basic Examples.<br />

How do I enable the fuzzy search index for a particular column?<br />

See Basic Examples.<br />

The additional data structures will increase the total memory footprint of the loaded table. In unfavorable cases<br />

the memory footprint of the column can double.<br />

How can I see how much memory is used for a fuzzy search index?<br />

See Memory Usage [page 267].<br />

Is the score between request and result always stable for TEXT columns?<br />

It depends on how you look at the topic. The algorithm is indeed deterministic, but you need to take all parameters<br />

into account. Cases can be constructed where a small change in the fuzzySimilarity will change the rank between<br />

the same strings.<br />

Why is this? The fuzzySimilarity is the minimum score that tokens need to reach to be considered for the result. If<br />

you use andThreshold or the keyword "OR" in your search, not all tokens have to reach the fuzzySimilarity to be<br />

part of the result. This can lead to a change in the total score if you change the fuzzySimilarity. Let us look at an<br />

example:<br />

DROP TABLE companies;<br />

CREATE COLUMN TABLE companies<br />

(<br />

id INTEGER PRIMARY KEY,<br />

companyname SHORTTEXT(200)<br />

);<br />

INSERT INTO companies VALUES(1, 'aktien gesellschaft');<br />

INSERT INTO companies VALUES(2, 'aktiv gesellschaft');<br />

Important: The similarity between "aktien" and "aktiv" is 0.77.<br />

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

Enabling Search<br />

P U B L I C<br />

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

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

Saved successfully!

Ooh no, something went wrong!