-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First pass at switching our Spring Lucene configuration around to use multiple Directories and IndexWriters. Updated existing tests accordingly to make sure I didn't break anything. Note that this does not yet include writing to lucene as new resolvers are added.
- Loading branch information
Bill Smith
committed
Jul 24, 2018
1 parent
354747b
commit caa0299
Showing
10 changed files
with
138 additions
and
48 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/DirectoryService.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,16 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.service; | ||
|
||
import org.apache.lucene.store.Directory; | ||
|
||
/** | ||
* API component responsible for entity ids search. | ||
*/ | ||
@FunctionalInterface | ||
public interface DirectoryService { | ||
/** | ||
* Return a Directory for a given resource id. If one is not found, it will be created. | ||
* @param resourceId the resource to get the Directory for | ||
* @return Directory | ||
*/ | ||
Directory getDirectory(String resourceId); | ||
} |
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
18 changes: 18 additions & 0 deletions
18
backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/IndexWriterService.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,18 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.service; | ||
|
||
import org.apache.lucene.index.IndexWriter; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* API component responsible for entity ids search. | ||
*/ | ||
@FunctionalInterface | ||
public interface IndexWriterService { | ||
/** | ||
* Return a (possibly cached) index writer for a given resource id. | ||
* @param resourceId the resource to create the IndexWriter for | ||
* @return IndexWriter | ||
*/ | ||
IndexWriter getIndexWriter(String resourceId) throws IOException; | ||
} |
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.