Solr outputs the value of another field in one field

Viewed 41

There is a project on Spring Boot and Solr. There is an Employee entity that has the Work Phone and MobilePhone fields. The data is stored in the Employee table, respectively, from PostgreSQL. When searching through a Solr worker, everything is displayed correctly, except for mobilePhone. The value from the workPhone is somehow passed to mobilePhone. Why?

mobile

work

Employee

@SolrDocument(collection = "employee")
public class EmployeeIndex {

    private static final long serialVersionUID = -7591758092960218296L;

    @Field("last_name")
    private String lastName;

    @Field("first_name")
    private String firstName;

    @Field("middle_name")
    private String middleName;

    @Field("work_phone")
    private String workPhone;

    @Field("mobile_phone")
    private List<String> mobilePhone;
}

Repository

public interface EmployeeIndexRepository extends BasicIndexRepository<EmployeeIndex> {

    EmployeeIndex findFirstByLogin(String login);
}
 <copyField source="work_phone"                      dest="_text_"/>
    <copyField source="mobile_phone"                    dest="_text_"/>

<copyField source="work_phone"                      dest="text_highlight"/>
    <copyField source="mobile_phone"                    dest="text_highlight"/>

<copyField source="work_phone"                      dest="text_spell"/>
    <copyField source="mobile_phone"                    dest="text_spell"/>

0 Answers
Related