-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Update Hibernate Search dev console card for multiple persistence-units #25578
Update Hibernate Search dev console card for multiple persistence-units #25578
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
766109d
to
03efce8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added a few comments below.
Regarding your statements on the issue:
Didn't add multiple hibernate search cards per persistence unit, but rather added multiple tables on the page referenced by the card (it seems that this kind of grouping is used for other cards that display some multi pu data)
Agreed, that's a better solution than multiple cards.
Not sure if we can have entities with same name across multiple persistence units
Yes we can.
regarding the indexing, it will check and reindex the selected classes if found in the search mapping using the jpa entity name, should I add an explicit expectation for the pu or use the full class name?
Using the class name may not solve the problem; in general you can use the same entity class in multiple persistence units, though I'm not sure that's possible in Quarkus.
It's probably safer to be explicit about the targeted persistence unit; see my comment below.
...hibernate-search-orm-elasticsearch/deployment/src/main/resources/dev-templates/embedded.html
Show resolved
Hide resolved
@@ -1,11 +1,14 @@ | |||
{#include main} | |||
{#title}Indexed Entities{/title} | |||
{#body} | |||
{#if info:indexedEntityTypes.isEmpty} | |||
{#if info:indexedEntityTypes.isEmpty || info:indexedEntityTypes.allValuesEmpty} | |||
<p>No indexed entities were found.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p>No indexed entities were found.</p> | |
<p>No persistence units were found.</p> |
...o/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchSupplier.java
Outdated
Show resolved
Hide resolved
independent-projects/qute/core/src/main/java/io/quarkus/qute/ValueResolvers.java
Outdated
Show resolved
Hide resolved
...hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchDevConsoleRecorder.java
Outdated
Show resolved
Hide resolved
...o/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchSupplier.java
Outdated
Show resolved
Hide resolved
...o/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchSupplier.java
Outdated
Show resolved
Hide resolved
03efce8
to
7dc58da
Compare
7dc58da
to
200557f
Compare
200557f
to
61d2ee6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. There's a bug when multiple entities from the same persistence unit are selected for reindexing, but apart from that it looks good. Let's merged once you fixed that :)
...o/quarkus/hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchSupplier.java
Outdated
Show resolved
Hide resolved
<input type="checkbox" class="form-check-input checkbox" name="{indexedEntityType.jpaName}" | ||
id="{indexedEntityType.jpaName}" value="{indexedPersistenceUnit.persistenceUnitName}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I checked, this works even if there are multiple entities in different PUs with the same name.
...hibernate/search/orm/elasticsearch/runtime/devconsole/HibernateSearchDevConsoleRecorder.java
Outdated
Show resolved
Hide resolved
61d2ee6
to
1b3550f
Compare
This looks good, thanks! Let's merge once CI passes. @mun711 I don't think the problem you noticed when adding |
Sure, will check out more details and open an issue in the next few days |
Fixes #14729