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

Allow injection of SearchSession/SearchMapping #13696

Merged
merged 8 commits into from
Dec 7, 2020

Conversation

yrodiere
Copy link
Member

@yrodiere yrodiere commented Dec 4, 2020

Based on #13694, which should be merged first. Creating this PR as a draft until it's done.

Related quickstart update: quarkusio/quarkus-quickstarts#725

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they need Elasticsearch so they are run if -Dtest-containers

quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
quarkus.hibernate-search-orm.automatic-indexing.synchronization.strategy=sync
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you expect the configuration to be potentially different depending on the PU?

Doesn't need to be part of this PR, just asking.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now you can make do by defining one backend per PU, but some settings (like this one) will have to be the same on all PUs, which is not great.

So yes, we'd need additional changes to fully support multiple PUs. In another PR :)

…ts API contracts

This is important for Hibernate Search in particular.
…y from a TransactionScopedSession

This is important for Hibernate Search in particular.

Signed-off-by: Yoann Rodière <[email protected]>
…orm-elasticsearch/deployment

Signed-off-by: Yoann Rodière <[email protected]>
This extension is based on a beta version of Hibernate Search.
While APIs are quite stable and the code is of production quality and thoroughly tested, some features are still missing, performance might not be optimal and some APIs or configuration properties might change as the extension matures.
====

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

----
<1> Inject a Hibernate Search session, which relies on the `EntityManager` under the hood.
Applications with multiple persistence units can use a CDI qualifier to select the right one:
either `@Named` or `@io.quarkus.hibernate.orm.PersistenceUnit`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker, but I'd prefer such a note to be fully expressed with an example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll add an example in the next PR that adds first-class support for multiple PUs.

@Sanne Sanne added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Dec 7, 2020
@gsmet gsmet merged commit 606aa6c into quarkusio:master Dec 7, 2020
@ghost ghost added this to the 1.11 - master milestone Dec 7, 2020
@yrodiere yrodiere deleted the search-inject branch May 17, 2021 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation area/hibernate-orm Hibernate ORM area/hibernate-search Hibernate Search area/persistence OBSOLETE, DO NOT USE triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants