Hi everyone, I am excited to start this thread where I will be sharing regular weekly updates on my progress, challenges, and discoveries as I work on my GSoC project.
Project Name - Enhanced Search Functionality for OpenELIS
Project Summary - This project aims to enhance the search capabilities within the OpenELIS system, particularly the Search Patient module, providing users with a more efficient way of retrieving patient information. We aim to integrate a Java search engine library Hibernate Search with an Apache Lucene backend, to index key columns such as patient ID, patient name and other relevant data, providing users a faster way to search results. This will also include the integration of fuzzy search capabilities which will allow for approximate matching based on similarity, wildcard search which will allow for specified pattern matching and range search which will allow for searching for values within a specified range.
Mentor - @Moses_Mutesasira
2 Likes
Community Bonding Period (May 1 - 26)
I had an insightful call with my mentor @Moses_Mutesasira to discuss and refine our project plan, particularly the low-level design of the Search Patient module. Here is a brief summary of the existing and proposed solutions that we discussed -
Existing solution
The current implementation of the patient search functionality is structured around a controller method getPatientResults, a service layer using the interface SearchResultsService and its implementation SearchResultsServiceImpl, and a Data Access Object (DAO) using the interface SearchResultsDAO and its implementation SearchResultsDAOImp.
Proposed Solution
-
We will create a new implementation of the SearchResultsService interface in the service layer, called LuceneSearchResultsService and a new implementation of the SearchResultsDAO interface, called LuceneSearchResultsDAO.
-
We will modify the existing service layer implementation SearchResultsServiceImpl to DatabaseSearchResultsService and the existing DAO implementation SearchResultsDAOImp to DatabaseSearchResultsDAO.
The coding period officially starts on May 27 and before that, I will focusing on learning more about Apache Lucene search queries and finalising the project plan with my mentor.
CC: @Moses_Mutesasira
1 Like
Coding Period - Week 1 (May 27 - June 2)
This week marked the beginning of the GSoC coding period, and I am excited to share the updates of the progress made during this week.
Focus Areas
- Adding the required dependencies
- Configuring end-to-end setup for Hibernate Search and Lucene index storage
Accomplishments
-
Issues
-
Pull Requests
-
Add Hibernate Search dependencies to pom.xml (Merged)
To configure Hibernate Search, I first added the necessary dependencies to the projectβs pom.xml file.
-
Add configuration for Lucene index storage (Merged)
After adding the dependencies, we needed to specify where Lucene should store the search indexes. This was done through configuration properties in the persistence.xml file.
-
Implement persistent Lucene indexing with Docker volumes (Under review)
- To ensure that the search indexes persist when the backend container (openelisglobal-webapp) restarts, we will use Docker volumes.
- We will create a directory to store Lucene indexes when the container is created, and then define a volume for this directory to ensure that the indexes are not lost when the container is restarted or recreated.
Challenges
- I faced a blocker when I was experimenting with initialising the Lucene index for Patient entity.
- The error message I encountered was -
Error: HSEARCH600154: Unable to start index: HSEARCH600015: Unable to initialize index directory: /var/lib/lucene_index Context: index 'Patient'
- After some troubleshooting, I concluded the reason for this error was the user running the application openelisglobal-webapp - tomcat_admin lacked permissions to create the directory.
- I solved this issue by making changes in the Dockerfile. I created the necessary directory structure (
/var/lib/lucene_index
) and setting the required ownership and permissions.
Next steps
- Getting the remaining PR merged by reviewing feedback and making changes if required
- Mapping entities to indexes
- Adding new implementations for the service layer and the DAO
- Modifying the existing implementations
CC: @Moses_Mutesasira
2 Likes