i upgraded hibernate search 4.4 5.3 , sucessfully migrated issues in hibernate search migration guides, i'm encountering following error regarding date property when using multifieldqueryparser.
org.hibernate.search.exception.searchexception: hsearch000233: specified query '+(datefield:value)' contains string based sub query targets numeric encoded field(s) 'mydate'. check query or try limiting targeted entities. my date property pretty standard
@column(name = "my_date") @temporal(temporaltype.timestamp) @field @datebridge(resolution = org.hibernate.search.annotations.resolution.day) private date mydate; versions
- hibernate 4.3
- hibernate search 5.3
- had explicitly import (maven)
org.apache.lucene.lucene-queryparser(4.10.4)org.apache.lucene.queryparser.classic.multifieldqueryparser, otherwise wouldn't find it
also found issue (hsearch-1870) regarding date values, not sure if related.
am missing on mydate declaration?
edit: missed 1 migration requirement - see answer bellow.
as turns out missed 1 migration requirement: enconding set numeric in hs 5 default.
setting encoding mimic behavior in previous versions fixed it.
@column(name = "my_date") @temporal(temporaltype.timestamp) @field @datebridge(resolution = org.hibernate.search.annotations.resolution.day, encoding = encodingtype.string) private date mydate;
Comments
Post a Comment