Closed
Description
dmarko484 opened DATAMONGO-2316 and commented
When POJO is annotated with @Document
+ collation specified (e.g. below) now when there is a field annotated as 8@TextIndexed
this index is not created during application start with error as below. Seems that index is being created with collation info but this option is not available for TextIndex
, so it fails.
@Document(collection = "custPerson", language = "en", collation = "cs")
public class Person {
@TextIndexed String firstname;
}
Error we are getting in this situation:
Nested exception is com.mongodb.MongoCommandException: Command failed with error 67 (CannotCreateIndex): 'Index type 'text' does not support collation: \{ locale: "cs", caseLevel: false, caseFirst: "off", strength: 3, numericOrdering: false, alternate: "non-ignorable", maxVariable: "punct", normalization: false, backwards: false, version: "57.1" }'
Affects: 2.2 RC1 (Moore)
Reference URL: https://docs.mongodb.com/manual/core/index-text/#collation-option