Offer API to index and query third party datasources easily

Description

NOTE: This is probably at least partially addressed by the mapper-javabean module, which as of is not published to Maven repositories.

The idea is to offer a layer that simplifies how to write ORM or Infinispan style integration.
The source of change events becomes an explicit call of this new API.

The target audience is for example CRUD (or more evolved) (micro)services that want to index data on each C_UD operation and have the ability to write full-text queries and retrieve the entities.

100% Done
Loading...

Activity

Show:

Yoann Rodière June 26, 2023 at 6:35 AM

Closing as this is now addressed with the Standalone Pojo Mapper.

Yoann Rodière June 16, 2022 at 1:16 PM

Note this feature has also been requested downstream:

Yoann Rodière July 7, 2020 at 2:28 PM

This feels like a first draft could be implemented easily, so I'll tentatively target 6.0.

Use case

I have an application that sends data to a datastore, but this datastore is not a relational database or is not accessed through Hibernate ORM.
I want similar functionality to hibernate-search-mapper-orm, and I am prepared to provide the change events myself.

Potential solution

We could just use the javabeans mapper, probably renamed.

The only things that would be missing, in my opinion:

  • Some way to configure the "model paradigm":

    • tree/document: entities are trees and are not expected to have any association to other entities. This means reindexing resolvers are disabled, and we won't check for inverse side of associations.

    • graph: similar to Hibernate ORM: entities are trees but are expected to have associations to other entities. This means reindexing resolvers are enabled and we will check for inverse side of associations.

Regarding the name: maybe rename it to hibernate-search-mapper-pojo? But that may create split packages with the pojo-base module, so maybe a different name?

Later, we'll need more features:

  • Allow users to configure their own loader for results. WARNING: In order to prepare for this, we need to make sure the search API uses selectEntities() by default (but fails, because there's no loader).

  • Allow better projections from Elasticsearch

Optionally, we could go a step further and provide an API that specifically targets Elasticsearch. But maybe this should be a separate module, e.g. hibernate-search-standalone-elasticsearch?

Yoann Rodière May 3, 2018 at 7:30 AM

Moving to Search 6.

Most of the infrastructure necessary to integrate an even source/datastore other than Hibernate ORM is already available in Search 6. You simply need to write a custom mapper derived from the POJO mapper.

However, it seems this ticket is supposed to benefit to Hibernate Search users, not integrators.
If so, we need to make things simpler in Search 6, or at least add documentation about how to write a (simple) mapper.

Emmanuel Bernard April 15, 2015 at 8:02 AM

It doe snot seem to be clear from a few conversations I have seen. This API targets end developers, not integrators. A typical use case is the following.
I have a microservice storing data in a specific backend not covered with a native Hibernate Search integration. I would use this explicit API to enable my full-text search.

Fixed

Details

Assignee

Reporter

Fix versions

Epic Name

Epic Status

Done
Created February 5, 2015 at 4:38 PM
Updated September 1, 2023 at 9:21 AM
Resolved June 26, 2023 at 6:35 AM