So I have a User with a fullName property that has @Indexed IndexType.FULLTEXT.
@NotNull
@Indexed(indexName = "fullName", indexType = IndexType.FULLTEXT)
private String fullName;
If I have names like
Cathy Johnson
John Doe
Alex Lifeson
Bill Hader
and more.
I have done some tests where if I type in "John*" or "John" I correctly get Cathy Johnson and John Doe. But if I use "Alex*" or "Alex" I get no results, if I type "Bill*" or "Bill" I get no results. So it looks like it works sometimes but not others.
Here is the derived query method in my UserRepository interface
Page<User> findByFullName(String fullName, Pageable pageable);
Here is my code in my service calling that repo method
I even modified it so it didn't concatenate the "*" but always the same results as above.Code:List<User> results = userRepository.findByFullName(searchCriteria + "*", PageRequestHandler.getPageRequest()) .getContent();
Thanks
Mark


Reply With Quote