More exact, these are my classes:
@Entity @Indexed public class Ficha {
@Id @DocumentId private Integer id;
@IndexedEmbeded private Translation translatedName;
@IndexedEmbeded private Translation translatedDescription; ....
... @Entity @Indexed public class Translation {
@Id @DocumentId private Integer id;
@IndexedEmbeded Map <Language, TranslationValue> translationValues; .... ... @Entity @Indexed public class TranslationValue {
@Id @DocumentId private Integer id;
@Field(index=Index.TOKENIZED, store=Store.NO) String value; ....
@Entity @Indexed public class Language {
@Id @DocumentId private Integer isoName ....
and the query:
select ficha from Ficha ficha
where ficha.translatedDescription.translationValues[:language].value LIKE %:text% )
or
item.translatedName.translationValues[:language].value LIKE %:text%
It never returns matchings for the first expression. However, if add a close bracket at the end of the first expression, it returns results. Could be a parser bug?
Thanks a lot.
|