mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[CM] Onboard maps
to cross-type search (#155148)
## Summary Part of https://github.com/elastic/kibana/issues/152224 Follow up to https://github.com/elastic/kibana/issues/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.
This commit is contained in:
parent
cfc01d5444
commit
6aa1491c9e
21 changed files with 316 additions and 23 deletions
|
@ -103,6 +103,20 @@ const searchSchemas = getOptionalInOutSchemas({
|
|||
),
|
||||
});
|
||||
|
||||
// Schema to validate the "msearch" service objects
|
||||
const mSearchSchemas = schema.maybe(
|
||||
schema.object({
|
||||
out: schema.maybe(
|
||||
schema.object(
|
||||
{
|
||||
result: schema.maybe(versionableObjectSchema),
|
||||
},
|
||||
{ unknowns: 'forbid' }
|
||||
)
|
||||
),
|
||||
})
|
||||
);
|
||||
|
||||
export const serviceDefinitionSchema = schema.object(
|
||||
{
|
||||
get: getSchemas,
|
||||
|
@ -111,6 +125,7 @@ export const serviceDefinitionSchema = schema.object(
|
|||
update: createSchemas,
|
||||
delete: getSchemas,
|
||||
search: searchSchemas,
|
||||
mSearch: mSearchSchemas,
|
||||
},
|
||||
{ unknowns: 'forbid' }
|
||||
);
|
||||
|
|
|
@ -240,6 +240,7 @@ describe('CM services getTransforms()', () => {
|
|||
'delete.out.result',
|
||||
'search.in.options',
|
||||
'search.out.result',
|
||||
'mSearch.out.result',
|
||||
].sort()
|
||||
);
|
||||
});
|
||||
|
|
|
@ -34,6 +34,7 @@ const serviceObjectPaths = [
|
|||
'delete.out.result',
|
||||
'search.in.options',
|
||||
'search.out.result',
|
||||
'mSearch.out.result',
|
||||
];
|
||||
|
||||
const validateServiceDefinitions = (definitions: ServiceDefinitionVersioned) => {
|
||||
|
@ -175,6 +176,11 @@ const getDefaultServiceTransforms = (): ServiceTransforms => ({
|
|||
result: getDefaultTransforms(),
|
||||
},
|
||||
},
|
||||
mSearch: {
|
||||
out: {
|
||||
result: getDefaultTransforms(),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const getTransforms = (
|
||||
|
|
|
@ -59,6 +59,11 @@ export interface ServicesDefinition {
|
|||
result?: VersionableObject<any, any, any, any>;
|
||||
};
|
||||
};
|
||||
mSearch?: {
|
||||
out?: {
|
||||
result?: VersionableObject<any, any, any, any>;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface ServiceTransforms {
|
||||
|
@ -112,6 +117,11 @@ export interface ServiceTransforms {
|
|||
result: ObjectTransforms<any, any, any, any>;
|
||||
};
|
||||
};
|
||||
mSearch: {
|
||||
out: {
|
||||
result: ObjectTransforms<any, any, any, any>;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface ServiceDefinitionVersioned {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue