I have been reading and investigating and not had much luck. Is there a way to tie joined entities into the same index as the main entity. For example:
Code:
@Entity
@Indexed(index="indexes/foo")
public class Foo
private Long id;
private Set<Bar> bars = new HashSet<Bars>();
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Keyword(id=true)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
public Set<Bar> getBars() {
return bars;
}
public void setBars(Set<Bar> bars) {
this.bars = bars;
}
}
How do I get Bars to be indexed and searchable as part of the same index, but return the found Foo class when matched?