I'm happy to share with you the release 2.0.0 of Spring Data Search.
This library allows to automatically expose endpoints in order to search for data related to Entities.
It provides an advanced search engine that can search on any Entity field, combine multiple criteria to refine the search, and even search on nested Entity fields.
Kobee1203 / spring-data-search
Automatically exposes Entity endpoints to search for data using a powerful query language
There are some new features, and some fixed bugs.
But above all there was a core refactoring to support different data access layers (JPA, MongoDB, ...).
Currently, there is only JPA supported (which was already supported by previous versions). But the next step is to add support to MongoDB.
This refactoring required some modifications in the APIs.
There is a page describing how to migrate from 1.x to 2.x.
Whats's new:
- Allow special keywords to be used as query values:
-
CURRENT_DATE: keyword representing the current date. Similar to the
current_date()
function in SQL. -
CURRENT_TIME: keyword representing the current time. Similar to the
current_time()
function in SQL -
CURRENT_DATE_TIME: keyword representing the current date time. Similar to the
current_timestamp()
function in SQL
-
CURRENT_DATE: keyword representing the current date. Similar to the
- Application property
spring.data.search.default-alias-resolver.field-suffixes
: Comma-separated list of field suffixes to be removed in order to create a field's alias from thecom.weedow.spring.data.search.config.DefaultAliasResolver
. Default value isEntity,Entities
- Improved search on fields of
Map
type: You can use the special keyskey
orvalue
to query the keys or values respectively. And now, you can query on the nested fields of the Objects representing bykey
orvalue
- /search/person?
tasks.key.name=shopping
- /search/person?
vehicles.features.value.name=gps
- /search/person?
If you are interested and want to know more, please go to the project page where you will find all the details.
Top comments (0)