-
Notifications
You must be signed in to change notification settings - Fork 291
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
Make LuceneSearchResultsServiceImpl the primary implementation for SearchResultsService interface #1218
Open
rahul6603
wants to merge
22
commits into
I-TECH-UW:develop
Choose a base branch
from
rahul6603:primary-lucene
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Make LuceneSearchResultsServiceImpl the primary implementation for SearchResultsService interface #1218
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8656f99
Make Lucene implementations for search service and DAO primary
rahul6603 17add82
Merge branch 'develop' into primary-lucene
mozzy11 9b6a1d5
Merge branch 'develop' into primary-lucene
mozzy11 49f8ae8
Merge branch 'develop' into primary-lucene
rahul6603 6f1dab7
Merge branch 'develop' into primary-lucene
mozzy11 0ffad16
Merge branch 'develop' into primary-lucene
rahul6603 171d2dd
Merge branch 'develop' into primary-lucene
mozzy11 03a4568
Merge branch 'develop' into primary-lucene
rahul6603 4342ce0
Fix SQL query in LuceneSearchResultsDAOImpl
rahul6603 6682cdc
Merge branch 'develop' into primary-lucene
mozzy11 d4145d5
Merge branch 'develop' into primary-lucene
mozzy11 d4196f3
Merge branch 'develop' into primary-lucene
rahul6603 34c8b49
Merge branch 'develop' into primary-lucene
mozzy11 19d31dd
Merge branch 'develop' into primary-lucene
rahul6603 66b2d3b
Merge branch 'develop' into primary-lucene
mozzy11 baef461
Merge branch 'develop' into primary-lucene
rahul6603 ac70aba
Merge branch 'develop' into primary-lucene
mozzy11 c8c787f
some fixes on Lucene Search implementation
mozzy11 d3a1f36
Merge branch 'develop' into primary-lucene
mozzy11 d89ab84
fix e2e
mozzy11 d4a457e
Merge branch 'primary-lucene' of https://github.com/rahul6603/OpenELI…
mozzy11 7cec24d
Merge branch 'develop' into primary-lucene
mozzy11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
src/main/java/org/openelisglobal/hibernate/search/massindexer/AutoMassIndexer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.openelisglobal.hibernate.search.massindexer; | ||
|
||
import org.openelisglobal.common.log.LogEvent; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.ApplicationListener; | ||
import org.springframework.context.event.ContextRefreshedEvent; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class AutoMassIndexer implements ApplicationListener<ContextRefreshedEvent> { | ||
|
||
@Autowired | ||
MassIndexerService massIndexerService; | ||
|
||
private static boolean alreadyIndexed = false; | ||
|
||
public void onApplicationEvent(ContextRefreshedEvent event) { | ||
if (alreadyIndexed) { | ||
return; | ||
} | ||
try { | ||
LogEvent.logInfo(this.getClass().getSimpleName(), "onApplicationEvent", | ||
"Started Rebuilding Lucene Indexes "); | ||
massIndexerService.reindex(); | ||
alreadyIndexed = true; | ||
LogEvent.logInfo(this.getClass().getSimpleName(), "onApplicationEvent", | ||
"Finished Rebuilding Lucene Indexes "); | ||
} catch (Exception e) { | ||
LogEvent.logDebug(e); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
By the way @rahul6603 , i can see nationalID and externalID are being indexed. why not search them from Lucene indexes instead of the DB
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.
you would also add that the tests if it works