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.

Original Letter Standardized Letter<br />

ä ae<br />

Ö oe<br />

ö oe<br />

Ü ue<br />

ü ue<br />

ß ss<br />

Because of this standardization we get high fuzzy scores for common differences in the spelling of words.<br />

Original term Standardized term<br />

müller mueller<br />

Mueller mueller<br />

Cafe cafe<br />

Café cafe<br />

Search on a String Column (VARCHAR, NVARCHAR)<br />

The decision if two strings are the same is based on the string representation that is stored in the dictionary for<br />

that column. The contents of a string column are converted to lowercase characters before they are stored in the<br />

dictionary. Other standardizations are not done.<br />

So it is possible to use the spellCheckFactor option to, for example, distinguish between 'café' and 'cafe'.<br />

CREATE COLUMN TABLE test_spell_check_factor<br />

(<br />

id INTEGER PRIMARY KEY,<br />

s NVARCHAR(255)<br />

);<br />

INSERT INTO test_spell_check_factor VALUES ('1','Muller');<br />

INSERT INTO test_spell_check_factor VALUES ('2','Mueller');<br />

INSERT INTO test_spell_check_factor VALUES ('3','Müller');<br />

INSERT INTO test_spell_check_factor VALUES ('4','Möller');<br />

SELECT SCORE() AS score, id, s<br />

FROM test_spell_check_factor<br />

WHERE CONTAINS(s, 'Müller', FUZZY(0.5, 'spellCheckFactor=0.9'))<br />

ORDER BY score DESC;<br />

DROP TABLE test_spell_check_factor;<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. 259

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

Saved successfully!

Ooh no, something went wrong!