From 8461ba2078657caf58930b9485020fe89aff4afe Mon Sep 17 00:00:00 2001 From: Gavin King Date: Fri, 18 Aug 2023 15:36:20 +0200 Subject: [PATCH] document a (possibly temporary) restriction --- documentation/src/main/asciidoc/introduction/Tuning.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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.