Skip to content
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

[CM] Search Layer: stage 1 - forward Saved Object .find() results #152224

Closed
13 of 21 tasks
vadimkibana opened this issue Feb 27, 2023 · 1 comment · Fixed by #154819 or #154896
Closed
13 of 21 tasks

[CM] Search Layer: stage 1 - forward Saved Object .find() results #152224

vadimkibana opened this issue Feb 27, 2023 · 1 comment · Fixed by #154819 or #154896
Assignees
Labels
Feature:Content Management User generated content (saved objects) management Project:BWCA compliance Work effort necessary for Serverless MVP, e.g. HTTP versioning, SO API deprecation work. Project:Serverless Work as part of the Serverless project for its initial release Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@vadimkibana
Copy link
Contributor

vadimkibana commented Feb 27, 2023

This issue tracks work of exposing the ability to search across content types.

@vadimkibana vadimkibana added Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Feature:Content Management User generated content (saved objects) management Project:Serverless Work as part of the Serverless project for its initial release Project:BWCA compliance Work effort necessary for Serverless MVP, e.g. HTTP versioning, SO API deprecation work. labels Feb 27, 2023
@vadimkibana vadimkibana changed the title [CM] Search across content types [CM] Search Layer: state 1 - forward Saved Object .find() results Mar 17, 2023
@vadimkibana vadimkibana changed the title [CM] Search Layer: state 1 - forward Saved Object .find() results [CM] Search Layer: stage 1 - forward Saved Object .find() results Mar 17, 2023
@Dosant
Copy link
Contributor

Dosant commented Mar 20, 2023

Dosant added a commit that referenced this issue Mar 31, 2023
## Summary

Part of #152224

Follow up to #150604 where
@majagrubic migrated existing usages of
`src/plugins/saved_objects/public/finder/` to
`src/plugins/saved_objects_finder/`

Removing `src/plugins/saved_objects/public/finder/` to make sure we
didn't miss any other usages, clean up leftovers and make sure we won't
introduce new usages by mistake.

The plan for later for `src/plugins/saved_objects_finder/` is
to[integrate it with Content Management and make it
backward-compatibility compliant.
](#152224)
Dosant added a commit that referenced this issue Apr 6, 2023
…154464)

## Summary

Partially addresses #152224
[Tech Doc
(private)](https://docs.google.com/document/d/1ssYmqSEUPrsuCR4iz8DohkEWekoYrm2yL4QR_fVxXLg/edit#heading=h.6sj4n6bjcgp5)

Introduce `mSearch` - temporary cross-content type search layer for
content management backed by `savedObjects.find`

Until we have [a dedicated search layer in CM
services](https://docs.google.com/document/d/1mTa1xJIr8ttRnhkHcbdyLSpNJDL1FPJ3OyK4xnOsmnQ/edit),
we want to provide a temporary solution to replace client-side or naive
server proxy usages of `savedObjects.find()` across multiple types with
Content Management API to prepare these places for backward
compatibility compliance.

Later we plan to use the new API together with shared components that
work across multiple types like `SavedObjectFinder` or `TableListView`

The api would only work with content types that use saved objects as a
backend.

To opt-in a saved object backed content type to `mSearch` need to
provide `MSearchConfig` on `ContentStorage`:

```
export class MapsStorage implements ContentStorage<Map> {
  // ... 
  mSearch: {
          savedObjectType: 'maps',
          toItemResult: (ctx: StorageContext, mapsSavedObject: SavedObject<MapsAttributes>) => toMap(ctx,mapsSavedObject), // transform, validate, version
          additionalSearchFields: ['something-maps-specific'],
        }
}
```


*Out of scope of this PR:*

- tags search (will follow up shortly)
- pagination (as described in [the doc]([Tech
Doc](https://docs.google.com/document/d/1ssYmqSEUPrsuCR4iz8DohkEWekoYrm2yL4QR_fVxXLg/edit#heading=h.6sj4n6bjcgp5))
server-side pagination is not needed for the first consumers, but will
follow up shortly)
- end-to-end / integration testing (don't want to introduce a dummy
saved object for testing this, instead plan to wait for maps CM onboard
and test using maps #153304)
- Documentation (will add into
#154453)
- Add rxjs and hook method
Dosant added a commit that referenced this issue Apr 13, 2023
…54819)

## Summary

Follow up to #154464
Partially resolve #152224 -
implement pagination and tags filtering
Dosant added a commit that referenced this issue Apr 13, 2023
…onboarding docs (#154896)

## Summary

Follow up to #154464
Partially resolve #152224 - Add
a `msearch` section to CM onboarding docs
Dosant added a commit that referenced this issue Apr 21, 2023
## Summary

Part of #152224
Follow up to #153256

This PR onboards maps CM integration into the multi-type search
(`msearch`). It isn't actually used anywhere in the user-facing UI yet,
as first other types need to be migrated to CM.

This PR also adds an example app to test the `msearch` end-to-end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Content Management User generated content (saved objects) management Project:BWCA compliance Work effort necessary for Serverless MVP, e.g. HTTP versioning, SO API deprecation work. Project:Serverless Work as part of the Serverless project for its initial release Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
2 participants