I am new to Elastic and spring-data-elastic. I am been searching here and other areas of the web, but so far have been unable to find the answer to my question. I am hoping SO might be able to help.
I am indexing some records from my Users
table (firstName, lastName) and I am looking to be able to allow advanced searching. So for example if I have the name 'Frances' and I enter 'Frank' then the system is smart enough to return the record. Same for 'Robinson' and 'Robinsen', etc.
I've setup my POJO to be the following:
Public Users {
@Field(fieldType = FieldType.String)
private String firstName;
@Field(fieldType = FieldType.String)
private String lastName
// mutators
...
}
Currently I am using a spring-data-elastic ElasticRepository
to do my searching, which I believe will probably have to change if I am going to allow for advanced searching. One option would be to use the EntityManager
or Template
directly in the UserService
, however I'm not sure how to go about doing that just yet.
As I've described the problem, is this an indexing issue or a searching issue or possibly both? I'm not looking for anyone to do the work, just to point me in the right direction.
Thanks!
Criteria
. I was looking at them before, but I missedCriteria.fuzzy
method. – Crossbill