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.

Terms within the quotation marks are not tokenized and are handled as a string. Therefore, all search<br />

matches must be exact.<br />

Note: If you enter multiple search terms, the AND operator is automatically interpreted. Therefore, you do<br />

not need to specify it.<br />

For more information about the unique syntax requirements of the CONTAINS predicate, see the <strong>SAP</strong> <strong>HANA</strong> SQL<br />

Reference.<br />

Scalar Functions<br />

For search queries using the CONTAINS predicate, you can use different scalar functions to either return<br />

additional information about the results of your search queries or enhance how the results are displayed. These<br />

functions include SNIPPET, HIGHLIGHTED, and SCORE.<br />

Limitations<br />

The following limitations apply to search queries using the CONTAINS predicate:<br />

● You cannot search on more than one table or view at a time. If more than one table is joined in the SELECT<br />

statement, then all columns mentioned in the CONTAINS predicate must come from only one of the tables.<br />

● You cannot enter a minus (-) search operator directly after OR.<br />

● Brackets are not supported as search operators.<br />

● Searches using the CONTAINS predicate do not consider non-physical columns, such as calculated columns,<br />

as search-relevant because these columns are created during the search and, therefore, are not available<br />

when <strong>SAP</strong> <strong>HANA</strong> internally checks the CONTAINS search query.<br />

● The CONTAINS predicate only works on column-oriented tables.<br />

● If you specify multiple CONTAINS predicates in the WHERE clause of the SELECT statement, only one of the<br />

predicates is allowed to consist of more than one column in the list of .<br />

Related Links<br />

<strong>SAP</strong> <strong>HANA</strong> SQL Reference: CONTAINS Predicate<br />

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

SNIPPET Function<br />

For search queries using the CONTAINS predicate, you can use the function SNIPPET to return search results<br />

with an excerpt of the text with your search term highlighted in bold. This short text excerpt provides some<br />

context for you to see where and how the term is used in the document.<br />

This function uses the following syntax:<br />

SELECT *, SNIPPET () FROM <br />

WHERE CONTAINS ()<br />

254<br />

P U B L I C<br />

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

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

Enabling Search

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

Saved successfully!

Ooh no, something went wrong!