I´ve a problem with generating an Index with a chain of embedded Objects.
It ist no Problem, if there is only One Associated Class associated to the class that is indexed but the problem appears, if there is a chain..
It lloks like this:
Code:
@Indexed
public class TEvent implements java.io.Serializable {
// Fields
@DocumentId
private Long eventId;
@IndexedEmbedded
private TLocation TLocation;
...
}
public class TLocation implements java.io.Serializable {
@DocumentId
private Long locationId;
@IndexedEmbedded //The next one that should be in the index
private TCountry TCountry;
@Field(index= Index.TOKENIZED)
private String addressRow1;
@Field(index= Index.TOKENIZED)
private String addressRow2;
@ContainedIn
private Set<TEvent> TEvents = new HashSet<TEvent>(0);
...
}
public class TCountry implements java.io.Serializable {
// Fields
@DocumentId
private String iso2;
@Field(index= Index.TOKENIZED)
private String name;
@ContainedIn
private Set<TLocation> TLocations = new HashSet<TLocation>(0);
...
}
The field TLocation.addressRow1 and all other Fields in TEvent appear in the index.
But I thought to get TLocation.TCountry.name in the index to.
But I cant manage :-(
What am I doing wrong?