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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PHRASE is similar to AND but restricts hits to those that contain the tokens as a phrase, that is, in the same order<br />

and with nothing between them. A PHRASE is indicated by adding double quotes around the tokens, within the<br />

single quotes (for example, ... WHERE CONTAINS (mycolumn, '"day dream"', FUZZY(0.5)) ... will not return an<br />

entry containing 'I dream of a day').<br />

The content type AND that is used for a full-text search (default behavior: textSearch=fulltext) is implemented as<br />

a logical AND to achieve better performance. For example, a search for 'Miller & Miller AG' with content type AND<br />

matches 'Miller AG'.<br />

textSearch=compare should be used for duplicate detection and for comparing company names, product names,<br />

and so on. Here, search results are better because of the strict AND comparison that is used. In other words, if<br />

you search for 'Miller & Miller' with content type AND, only records that contain the term 'Miller' at least twice are<br />

returned.<br />

A strict AND assigns terms from the user input to terms in the database entry only once (and vice versa). For<br />

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

Parameters Influencing the Score<br />

Name of Option Range Default Applies to Types<br />

bestMatchingTokenWeigh<br />

t<br />

considerNonMatchingTok<br />

ens<br />

Formula for score calculation:<br />

0.0..1.0 not set TEXT<br />

max, min, all, input, table max TEXT<br />

score = bestMatchingTokenWeight x max(tokenScores) + (1-bestMatchingTokenWeight) x √(Σ(tokenScore²)/<br />

tokenCount)<br />

tokenCount is determined according to the parameter considerNonMatchingTokens as follows:<br />

● input: Use search term token count<br />

● table: Use column value token count<br />

● all: Use sum of search and column value token count (where the numerator is multiplied by 2)<br />

● min: Use smaller value of token counts<br />

● max: Use larger value of token counts (default)<br />

Recommendations for specific search content types<br />

If you are using an "OR" search (searching for "this or that"), you should set considerNonMatchingTokens to table<br />

to get a useful score assessment.<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. 283

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

Saved successfully!

Ooh no, something went wrong!