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.

Tokens=input'))<br />

ORDER BY score DESC, id;<br />

SCORE ID T<br />

0.92 3 eins zwei drei<br />

0.92 4 eins zwei drei vier<br />

0.92 5 eins zwei drei vier funf<br />

Parameters Influencing the Result Set<br />

Option Range Default Applies to Types<br />

andSymmetric on,off off TEXT<br />

andThreshold 0.0..1.0 1.0 TEXT<br />

For examples, see Fuzzy Multi-Token Search with Soft AND [page 285] .<br />

Fuzzy Multi-Token Search with Soft AND<br />

A fuzzy search on one text column can also use a softer AND, so that not all tokens used in the search term have<br />

to match the result.<br />

There are two parameters that control this behavior:<br />

Option Name Range Default Applies to Types Short Description<br />

andSymmetric on,off off TEXT Activates a<br />

symmetric AND<br />

content search<br />

andThreshold 0.0..1.0 1.0 TEXT Determines the<br />

Creating example data:<br />

DROP TABLE test_soft_and;<br />

CREATE COLUMN TABLE test_soft_and<br />

(<br />

id INTEGER PRIMARY KEY,<br />

t SHORTTEXT(200) FUZZY SEARCH INDEX ON<br />

);<br />

INSERT INTO test_soft_and VALUES ('1','eins');<br />

INSERT INTO test_soft_and VALUES ('2','eins zwei');<br />

INSERT INTO test_soft_and VALUES ('3','eins zwei drei');<br />

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

Enabling Search<br />

percentage of<br />

tokens that need to<br />

match<br />

P U B L I C<br />

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

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

Saved successfully!

Ooh no, something went wrong!