-
Notifications
You must be signed in to change notification settings - Fork 32
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
[BIG Refactoring] Add abstraction for search backend client #464
Conversation
Affected libs:
|
dfe001a
to
d6cd5a1
Compare
b025a8b
to
493ed7c
Compare
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,
Few remarks
- we should move out gn4 models from the domain
atomic.operation
should not depend on gn4 model- we should only manipulate the pivot format, and remove the old model
- where will you put the mappers ?
- we should spread files in folders for the domain
shared/links
should be moved
It's on a good way though, congratz
|
||
export const DEFAULT_PAGE_SIZE = 10 | ||
|
||
export const FIELDS_SUMMARY: FieldName[] = [ |
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.
This should go in the domain with domain fields
includes: [...ES_SOURCE_BRIEF, 'createDate', 'changeDate'], | ||
}) | ||
this.searchFacade.setConfigRequestFields([ | ||
...FIELDS_BRIEF, |
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.
should be pivot format fields
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.
This needs a stronger abstraction and will be done later on
b6d9654
to
b2e96f8
Compare
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.
Testing
- clicking on header badges does not update the sortby input
b2e96f8
to
62d2916
Compare
This is rebased on main and generally finished, we need to do more tests in the various apps to make sure nothing is broken. I will rework the commit history to make the various steps of the refactoring clearer. Also note that I've left on the side the handling of favorites and filter geometry in the search state; I think this can be done in another PR because it was just too many changes at once. |
fd97210
to
73a786b
Compare
db3fb7c
to
88f0225
Compare
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.
Massive work !
Looks good, I noticed a breaking change with the wc elastic configuration. I added a note in the release description.
We can merge and slowly test and fix the side effects.
}) | ||
const state = reducerSearch(initialStateSearch, action) | ||
expect(state.config.filters).toEqual({ | ||
custom: { any: 'blah', other: 'Some value' }, | ||
elastic: {}, |
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.
Will break web components
filter='{"elastic": [{ "term": { "OrgForResource": "Géo2France" } }]}'
Also make some simplifications/improvements to it and adapt the iso19139 converter
All types related to the gn4 repository are moved as well
These will have to be reworked
The sort by combos have been slightly changed to avoid using JSON as values. This was breaking the e2e tests and doing a join(',') is also much simpler. The values for the orgs filter dropdown have been updated to show correct values. also fixed a bug when clicking on the org name in the dataset view
88f0225
to
6d70763
Compare
filters are SearchFilters like others and are merged with state filters before building the ES payload
🥳 |
🎉 |
Work in progress for OGC sprint.
Refactor the search client, which is now a full elasticsearch centric service, to be backend agnostic.
Add an abstraction, with clean architecture in mind and first add the gn4 (elasticsearch) implementation. This will prepare the work for adding OGC Records API later on.
We should work with DDD and try to focus on the domain and describe the models and usecases.