This content has been marked as final.
Show 2 replies
-
1. Re: infinispan query - assosication
sannegrinovero Apr 24, 2014 5:29 AM (in response to infiniuserx)1 of 1 people found this helpfulHi,
the Lucene index inherently suffers from the limitation you just described; one way around is to change your model to have either a getter in Author like "getFullName" on which you disable Analyzer (so that it doesn't separate on spaces) or in which you implement it with a keyword separator for example "return firstName + '_' + lastName" and search for the same.
Another common solution is to invert the relation:
class Book {
private String title;
}
class Author {
private String firstName;
private String lastName;
private Book wrote;
}
and then target Author for queries.
-
2. Re: infinispan query - assosication
infiniuserx Apr 24, 2014 5:02 PM (in response to sannegrinovero)Thank you Sanne, This what I thought, but I can't find confirmation in any documentation. Thank a lot.
-Naren