turkraft / springfilter

Dynamically filter JPA entities and Mongo collections with a user-friendly query syntax. Seamless integration with Spring APIs. Star to support the project! ⭐️
https://turkraft.com/springfilter
221 stars 37 forks source link

Make field not searchable #368

Closed TcheORfabio closed 7 months ago

TcheORfabio commented 7 months ago

It's it possible to make specific fields not searchable? Like forbid to be able to search by id or not being able to search by name and etc?

torshid commented 7 months ago

See my answer here: https://github.com/turkraft/springfilter/issues/233#issuecomment-1590045915

You may define your own function similar to getUserDaoPath in the example, and throw an exception for the fields you want to forbid.