File tree Expand file tree Collapse file tree
x-pack/platform/plugins/shared/global_search/server/routes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,15 @@ export const registerInternalFindRoute = (router: GlobalSearchRouter) => {
2323 validate : {
2424 body : schema . object ( {
2525 params : schema . object ( {
26- term : schema . maybe ( schema . string ( ) ) ,
27- types : schema . maybe ( schema . arrayOf ( schema . string ( ) , { maxSize : 100 } ) ) ,
28- tags : schema . maybe ( schema . arrayOf ( schema . string ( ) , { maxSize : 100 } ) ) ,
26+ // maxLength: matches client-side `input_max_limit` config default (1000)
27+ // see x-pack/platform/plugins/private/global_search_bar/server/config.ts
28+ term : schema . maybe ( schema . string ( { maxLength : 1000 } ) ) ,
29+ // maxLength: longest type is 'cloud-security-posture-settings' (31 chars), 128 adds buffer
30+ types : schema . maybe (
31+ schema . arrayOf ( schema . string ( { maxLength : 128 } ) , { maxSize : 100 } )
32+ ) ,
33+ // maxLength: tags are saved object UUIDs (36 chars), 128 adds buffer for non-standard IDs
34+ tags : schema . maybe ( schema . arrayOf ( schema . string ( { maxLength : 128 } ) , { maxSize : 100 } ) ) ,
2935 } ) ,
3036 options : schema . maybe (
3137 schema . object ( {
You can’t perform that action at this time.
0 commit comments