I have the same situation as this
@Entity @Indexed public class Place { @Id @GeneratedValue @DocumentId private Long id; @Field( index = Index.TOKENIZED ) private String name; @OneToOne( cascade = { CascadeType.PERSIST, CascadeType.REMOVE } ) @IndexedEmbedded private Address address; .... } @Entity public class Address { @Id @GeneratedValue private Long id; @Field(index=Index.TOKENIZED) private String street; @Field(index=Index.TOKENIZED) private String city; @ContainedIn @OneToMany(mappedBy="address") private Set<Place> places; ... }
Now the problem is this: If I change, for example, the name field in the Place entity, which objects will be reindexed?
1) Only the name field?
2) The whole Place object?
3) The entire Place object and objects annotated with @IndexedEmbedded?
The one I need for my purpose will be the third. So if this is not a standard, can there be some solution to achieve this behavior?
source share