-
Notifications
You must be signed in to change notification settings - Fork 4
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
#287 - Elastic search connection #307
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #307 +/- ##
=============================================
+ Coverage 79.72% 80.96% +1.24%
- Complexity 527 570 +43
=============================================
Files 112 125 +13
Lines 2224 2385 +161
Branches 133 144 +11
=============================================
+ Hits 1773 1931 +158
- Misses 393 394 +1
- Partials 58 60 +2 ☔ View full report in Codecov by Sentry. |
src/main/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsService.java
Fixed
Show fixed
Hide fixed
src/main/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsService.java
Fixed
Show fixed
Hide fixed
src/main/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsService.java
Fixed
Show fixed
Hide fixed
src/main/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsService.java
Fixed
Show fixed
Hide fixed
src/main/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsService.java
Fixed
Show fixed
Hide fixed
src/main/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsService.java
Fixed
Show fixed
Hide fixed
src/main/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsService.java
Fixed
Show fixed
Hide fixed
18e89fa
to
875bca7
Compare
src/test/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsServiceTest.java
Fixed
Show fixed
Hide fixed
src/test/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsServiceTest.java
Dismissed
Show dismissed
Hide dismissed
src/test/java/de/numcodex/feasibility_gui_backend/terminology/es/TerminologyEsServiceTest.java
Dismissed
Show dismissed
Hide dismissed
54ba3b5
to
3bd1224
Compare
- add a first implementation of a search using elastic search (requires external service) WIP
- add a switch to turn elastic search on or off
- add elastic host parameter
- add missing @crossorigin annotation on TerminologyEsController - fix return value in swagger config for search (not an array)
- add ontology search result "wrapper" around search results, adding total hits - add requestparams to search endpoint (not doing anything yet)
- move search-logic from TerminologyEsController to TerminologyEsService - read available filter values from es - read available filter fields from config - wip: aggregation handling - wip: which search variant to use - todo: pagination
- use repositories for searching
- use multimatch query for our default query - add criteria-profile-data endpoint - move TerminologyEsService.java to another package - add dtos for elastic search results since mapping is needed from context.code to context (WIP) - still WIP
- add selectable attribute - adapt to context being an object instead of a string - convert entries between the model in elastic search and the api format - add (clumsy) queries considering filters (this is not solved in a sophisticated manor) - add endpoint to query for relatives of entries - add endpoint to retrieve criteria profile data (uiprofile, context and termcodes)
- change valueDefinition entry from String to AttributeDefinition.class in UiProfile
- change TermCode to List<Termcode> in CriteriaProfileData
- add referenceCriteriaSet to AttributeDefinition
- add "reference" to ValueDefinitonType - change datatype for referenceCriteriaSet in AttributeDefinition from CriteriaSet to plain String - remove unused CriteriaSet.java
- add check for availability (currently > 0 = available) - this is not very sophisticated...but it is working - remove unused methods
- Rename TerminologyEsController to TerminologyEsRestController - Add TerminologyEsRestControllerIT
- Add more tests - remove unused OntologySearchResult.java
- Change classes to records - fix parameter list in search test
- Start working on TerminologyEsServiceIT
- Increase Test Coverage
- Update swagger file - rename params on api/v3/terminology/entry/search - add elastic search parameters to readme
- Replace the strange queries for each amount of filters in OntologyListItemEsRepository with queries built with the different query builders from elastic search query dsl
3bd1224
to
1273150
Compare
- Add NoArgsConstructor and AllArgsConstructor to UiProfile classes
0c9a8bb
to
f93befc
Compare
- Add Debug output when loading a ui profile fails
@@ -26,11 +31,13 @@ public class AttributeDefinition { | |||
@JsonProperty("optional") | |||
private Boolean optional; | |||
@JsonProperty("allowedUnits") | |||
private List<Unit> allowedUnits = new ArrayList<>(); | |||
private List<TermCode> allowedUnits = new ArrayList<>(); |
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.
is this really supposed to be TermCode and not Unit - please check with @geloro94
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 would move that question to a new issue and merge this one here.
This adds searching in an external elastic search instance to the backend. Elastic Search connection can be configured via env parameters (see readme.md).
Currently, this requires manual work in order to get it started. (Setting up elastic search instance, creating and populating indices). There are already issues that address these inconveniences (#289, #288)
In order to get it up and running:
Please squash before merging!