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

Hibernate Search Standalone Pojo Mapper: Hibernate Search without Hibernate ORM / datasource #26182

Closed
cthiebault opened this issue Jun 16, 2022 · 6 comments · Fixed by #39415
Assignees
Labels
area/hibernate-search Hibernate Search / Elasticsearch kind/extension-proposal Discuss and Propose new extensions
Milestone

Comments

@cthiebault
Copy link

Description

It would be great to be able to use Hibernate Search without a datasource but just to index data to Elasticsearch.

I'm persisting my entities to DynamoDB and I need to index them to Elasticsearch/Opensearch.
Right now I can't use Hibernate Search because it requires a datasource to persist entities before indexing them.

I could use an in-memory datasource like H2 and forget about it on shutdown (we are using AWS Lambda) but as we use Quarkus to improve our memory footprint it's really not the best approach :-/

Implementation ideas

No response

@cthiebault cthiebault added the kind/enhancement New feature or request label Jun 16, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 16, 2022

/cc @gsmet, @yrodiere

@quarkus-bot quarkus-bot bot added the area/hibernate-search Hibernate Search / Elasticsearch label Jun 16, 2022
@yrodiere
Copy link
Member

yrodiere commented Jun 16, 2022

I'm glad you asked :) This is being worked on upstream, when that's ready we'll have a look at adding it to Quarkus.

@yrodiere
Copy link
Member

To clarify, and to make @gsmet happy: when I say it's being worked on, it's actually the main focus of the very next version of Hibernate Search (6.2). So, it's being actively worked on :)

@loicmathieu
Copy link
Contributor

@yrodiere just saw it has been released upstream and I rebase an old prototype I made years ago (to base an hypotetical Elasticsearch with Panache extension on it, see https://groups.google.com/g/quarkus-dev/c/pDQJ_yRNML4/m/UjCwseXXAwAJ).

So I have a working protocole for Hibernate Search Pojo Standalone Elasticsearch which I can propose when 6.2.0 is integrated in Quarkus, I just need to rename the extension and clean things a little: main...loicmathieu:hibernate-search-pojo-standalone-elasticsearch

@yrodiere
Copy link
Member

@loicmathieu 6.2 is still in Alpha at the moment, so unfortunately it will be a little while until it gets integrated into Quarkus.

That being said, this patch would be a nice start.

Removing the "panache" name from there is definitely required, indeed: IMO making this "Panache-y" would require (much) more work. I had started preliminary work on the APIs there, but it's just a draft of the API (it doesn't work) and unfinished at that; I haven't had time to get back to it.

Also, I suspect we'll need to copy a bit more from the Hibernate Search ORM Elasticsearch extension in order to get it to really work in native mode. And I think there'll be some work required on the Hibernate Search side to initialize part of Hibernate Search during static init.

@loicmathieu
Copy link
Contributor

@yrodiere yes, it was preliminary work for Elasticsearch with Panache but no "panache" stuff was done, I'll rename it. And yes, native has not been tested yet.

We'll revisit it when 6.2 will be integrated into Quarkus, we can still decide if we need to integrate it or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-search Hibernate Search / Elasticsearch kind/extension-proposal Discuss and Propose new extensions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants