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.

A full text index is an additional data structure that is created to enable text search features on a specific column<br />

in a table. Conceptually, full text indexes support searching on columns in the same way that indexes support<br />

searching through books.<br />

To create a full text index, proceed as follows:<br />

1. Determine the columns for which you require an index.<br />

2. Use the CREATE FULLTEXT INDEX statement to create an index with the specified index name.<br />

CREATE FULLTEXT INDEX ON '(' ')'<br />

[]<br />

3. Specify any of the following additional parameters for the full text index:<br />

LANGUAGE COLUMN <br />

LANGUAGE DETECTION '(' ')'<br />

MIME TYPE COLUMN <br />

FUZZY SEARCH INDEX <br />

PHRASE INDEX RATIO <br />

CONFIGURATION <br />

SEARCH ONLY <br />

FAST PREPROCESS <br />

FUZZY SEARCH INDEX <br />

TEXT ANALYSIS <br />

SYNC<br />

|ASYNC<br />

|ASYNC FLUSH [QUEUE] EVERY n MINUTES<br />

|ASYNC FLUSH [QUEUE] AFTER n DOCUMENTS<br />

|ASYNC FLUSH [QUEUE] EVERY n MINUTES OR AFTER m DOCUMENTS<br />

If you do not specify any parameters, the default values are used.<br />

The system creates a separate hidden full text index column for each source column that you have specified.<br />

You can now create queries to search those columns.<br />

You can check the parameters of an existing full text index by using the SYS.FULLTEXT_INDEXES monitoring<br />

view.<br />

Related Links<br />

You want to create a full text index i1 for table A, column C, with the following characteristics:<br />

● Synchronous processing<br />

● Fuzzy search index disabled<br />

● Languages for language detection: English, German, and South Korean<br />

To create the index, you use the following syntax:<br />

CREATE FULLTEXT INDEX i1 ON A(C) FUZZY SEARCH INDEX OFF<br />

SYNC<br />

LANGUAGE DETECTION<br />

('EN','DE','KR')<br />

Full Text Index Types [page 237]<br />

<strong>SAP</strong> <strong>HANA</strong> automatically creates full text indexes for columns of type TEXT and SHORTTEXT(n). For other<br />

column types, you must manually create any required full text indexes.<br />

236<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!