Search 未对@IndexedEmbedded字段执行hibernate搜索分析

Search 未对@IndexedEmbedded字段执行hibernate搜索分析,search,lucene,hibernate-search,Search,Lucene,Hibernate Search,firstName字段将在索引用户中进行分析,而不会在索引事件中进行分析。 这是否正确?将在事件索引中对其进行分析,但在这种情况下,字段名将为user.firstName。您可以使用@IndexedEmbedded的otional属性覆盖默认前缀。不会对字段进行分析!它以“user.firstName”的名称添加到索引“Event”中,但没有分析! @Indexed public class Event implements Serializable { @DocumentId

firstName字段将在索引用户中进行分析,而不会在索引事件中进行分析。
这是否正确?

将在事件索引中对其进行分析,但在这种情况下,字段名将为user.firstName。您可以使用@IndexedEmbedded的otional属性覆盖默认前缀。

不会对字段进行分析!它以“user.firstName”的名称添加到索引“Event”中,但没有分析!
@Indexed
public class Event implements Serializable {

    @DocumentId
    private Long id;    

    @Field
    @AnalyzerDiscriminator(impl = LanguageDiscriminator.class) // "de", GermanAnalyzer
    private String lang;               

    @IndexedEmbedded    
    private User user;

}

@Indexed
@Analyzer(impl = GermanAnalyzer.class)
public class User implements Serializable {        

    @DocumentId   
    private Long id;           

    @Field
    private String firstName;

  }