I am using spring data solr for my application and trying to implement autocomplete feature.
@SolrDocument
public class UserEntity{
@Field
private String id;
@Field
private String fullName;
@Field
private Date dob;
@Field
private String address;
@Field
private String phoneNumber;
}
I managed to implement autocomplete for single fields by using spring data solr Criteria . But this got drawback becuase this will return a list of UserEntities. I have to iterate the user list and get the names.
1 . Is there any way that I can get only the matching Names using spring data solr ?
2 . If I need to implement autocomplete across multiple fields (name and address together) is it possible to do it using spring data solr ?