diff --git a/documentation/src/main/asciidoc/introduction/Tuning.adoc b/documentation/src/main/asciidoc/introduction/Tuning.adoc index 9343e3c62d..e683069077 100644 --- a/documentation/src/main/asciidoc/introduction/Tuning.adoc +++ b/documentation/src/main/asciidoc/introduction/Tuning.adoc @@ -1029,12 +1029,14 @@ It's even possible to specify an ordering for an indexed column, or that the ind [source,java] ---- @Entity -@Table(indexes=@Index(columnList="lower(title), year desc, publisher_id")) +@Table(indexes=@Index(columnList="(lower(title)), year desc, publisher_id")) class Book { ... } ---- This lets us create a customized index for a particular query. +Note that SQL expressions like `lower(title)` must be enclosed in parentheses in the `columnList` of the index definition. + [TIP] ==== It's not clear that information about indexes belongs in annotations of Java code.