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