Add support for SAP HANA full-text search functions

Description

There is no support for the SAP HANA full-text search functions (CONTAINS, SCORE, HIGHLIGHTED, SNIPPETS) in the HANA Hibernate dialect.

SCORE, HIGHLIGHTED, and SNIPPETS can be added easily as these are regular functions.

CONTAINS is more difficult, because it's actually a predicate, i.e. it doesn't take an operator and a comparison expression, which isn't supported by the HQL parser. For now, the best workaround seems to be to introduce a dummy function that can act as the right-hand side of the expression that in conjunction with the CONTAINS function implementation will remove the operator via a SQL comment.

Since negation of a predicate is also not possible for the reasons listed above, a NOT_CONTAINS function is also needed that can be used to create negative CONTAINS queries.

Example

The HQL query

will translate to the native SQL query

Example 2

The HQL query

will translate to the native SQL query

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created October 10, 2018 at 1:33 PM
Updated November 15, 2018 at 1:43 PM
Resolved October 12, 2018 at 9:35 AM