Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support TextTagField and TextField GraterThan, LessThan or CompareTo #526

Open
guos opened this issue Nov 24, 2024 · 1 comment
Open

Support TextTagField and TextField GraterThan, LessThan or CompareTo #526

guos opened this issue Nov 24, 2024 · 1 comment

Comments

@guos
Copy link

guos commented Nov 24, 2024

@bsbodden Sorry to trouble you ,
any way to achive field> string

-------------------------obj as
@document
Comments{
@id
String comId;
.........................
}

-------------------------want something like sql where com_id>'xxx' for string field

entityStream.of(Comments.class).filter(e-> (Comments$.COM_ID.gt("100000003"))).collect(Collectors.toList());

checked ,

ExampleMatcher,TextTagField ,TextField

also try something in RedisDocumentRepository

List findByComIdGreaterThan(String comId);

but they are not working

@guos
Copy link
Author

guos commented Nov 27, 2024

I use follow way :

public List<Comments> queryComments(String commentsId) {
	
	
	Predicate<String> predicate = i -> (i.compareTo(commentsId) > 0);

	List<String> commentsIds = entityStream.of(Comments.class).map(Comments$.COMMENT_ID).filter(predicate)
			.collect(Collectors.toList());
	
	 return commentRepo.findAllById(commentsIds);
	
	
}

@guos guos changed the title Anyway to support TextTagField and TextField GraterThan, LessThan or CompareTo Support TextTagField and TextField GraterThan, LessThan or CompareTo Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant