-
Notifications
You must be signed in to change notification settings - Fork 63
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] Part 1: Remove custom ElasticSearch integration #6209
Conversation
From FindBugs. SimpleDateFormat class is not thread-safe. Using an object across threads may result in undefined behavior.
This is done in anticipation of the upcoming renaming of the X packages.
This also considers non-empty strings that consist of white space only as empty, which, as far as I can see, is the more correct choice in all places.
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 a lot for this updated pull request! I think this represents a much better intermediate work in progress to review than the last pull request.
I also want to thank you for the additional explanations you provided for various details of your pull request.
Concerning the changes themselves, I first of all support the general direction you took here by first removing all ElasticSearch parts from the code to create a preliminary version that only operates with the DB. I very much hope you will be able to succeed in integrating HibernateSearch from here while still supporting all relevant functionalities currently available in Kitodo.Production.
Some specific remarks concerning your work so far:
-
As you pointed out in your description, filters are not working in the current state of this pull request. While trying to integrate HibernateSearch myself some years ago I found mapping all existing Kitodo.Production filters from ElasticSearch to HibernateSearch was the most difficult part (which I didn't finish). Although the HibernateSearch integration itself might be mostly comprised of adding annotations, actually supporting the various required filters will probably prove a lot more challenging. I would like to stress that we agreed on keeping the existing functionality, so this is kind of the base line for me when judging whether the HibernateSearch integration will be successful or not in the end.
-
Concerning the filter functionalities I noticed that you configured some tests to be
ignored
(should bedisabled
in JUnit 5), but removed many others. Some of those removed tests are probably really obsolete in the future since we won't manually write to the index or manage index dependencies anymore, but manyfind...
methods (especially those with relevant filter configurations) will still be relevant and required with HibernateSearch. Therefor I would prefer if you handled those tests more consistently and set all tests that aren't supported in this preliminary work in progress state todisabled
instead of deleting them and then update and re-enable them again once HibernateSearch is completely available. (If the tests contain classes of the now removed ElasticSearch library, the test method body should be emptied and replaced with aTODO
as a reminder that this test has to be reworked for HibernateSearch) -
I would suggest to update the
hibernate-search
branch as soon as possible, since quite a few changes have been made to themaster
branch since the last update. Especially the testing framework has been updated from JUnit 4 to JUnit 5 so all new tests need to be updated with the new, corresponding annotations.
I am happy that you tried to focus on the parts relevant for the HibernateSearch integration and didn't try to rewrite the complete base of the application or introduce other fundamdental changes that have nothing to do with HibernateSearch.
I did find a few pages that don't work but should work. While project, template and process lists work fine with data obtained from the database, opening the task list and extended search triggers errors right now:
This and the fact that you removed so many tests should be kept in mind when judging the quality of a pull request based on a successful build here on GitHub accompanied by a green check mark.
Kitodo-DataManagement/src/main/java/org/kitodo/data/database/beans/BaseIndexedBean.java
Outdated
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/forms/CommentForm.java
Outdated
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/forms/LoginForm.java
Outdated
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/forms/ProcessForm.java
Outdated
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/services/data/ProcessService.java
Outdated
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/services/data/ProcessService.java
Outdated
Show resolved
Hide resolved
Kitodo/src/test/java/org/kitodo/production/services/data/ProcessServiceIT.java
Show resolved
Hide resolved
Kitodo/src/test/java/org/kitodo/production/services/data/FilterServiceIT.java
Outdated
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/services/data/TaskService.java
Outdated
Show resolved
Hide resolved
b63bc5f
to
b5ec8d2
Compare
I hope I haven't overlooked anything and have processed all your comments to your satisfaction. The task list and the extended search page are now loading as well.
|
@matthias-ronge thanks for incorporating the requested changes. I have no further remarks at this point and think it is advisable to move forward. |
Following a change in agreement with release management, the entire first part of the development package is provided in a joint pull request. This removes all previous ElasticSearch integration. In this state, the software can be operated without ElasticSearch.
The following functional restrictions apply: