From d70fd7c5958f377298c57c4a84681715fa16e10e Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 4 Mar 2025 16:08:44 +0400 Subject: [PATCH] Bring 8.17.2 release notes to 8.18 --- .../00ad41bde67beac991534ae0e04b1296.asciidoc | 11 ++ .../015e6e6132b6d6d44bddb06bc3b316ed.asciidoc | 2 +- .../0165d22da5f2fc7678392b31d8eb5566.asciidoc | 2 +- .../016f3147dae9ff2c3e831257ae470361.asciidoc | 2 +- .../01b23f09d2b7f140faf649eadbbf3ac3.asciidoc | 2 +- .../0bc6155e0c88062a4d8490da49db3aa8.asciidoc | 2 +- .../0bcd380315ef4691b8c79df6ca53a85f.asciidoc | 2 +- .../0bee07a581c5776e068f6f4efad5a399.asciidoc | 17 +-- .../0d689ac6e78be5d438f9b5d441be2b44.asciidoc | 2 +- .../0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc | 32 ++--- .../0f028f71f04c1d569fab402869565a84.asciidoc | 15 +++ .../0f2e5e006b663a88ee99b130ab1b4844.asciidoc | 2 +- .../0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc | 2 +- .../1147a02afa087278e51fa365fb9e06b7.asciidoc | 2 +- .../11e8d6e14686efabb8634b6522c05cb5.asciidoc | 2 +- .../120fcf9f55128d6a81d5e87a9c235bbd.asciidoc | 25 ++-- .../12adea5d76f73d94d80d42f53f67563f.asciidoc | 11 ++ .../13d91782399ba1f291e103c18b5338cc.asciidoc | 25 ++++ .../141ef0ebaa3b0772892b79b9bb85efb0.asciidoc | 5 +- .../15ac33d641b376d9494075eb1f0d4066.asciidoc | 10 ++ .../174b93c323aa8e9cc8ee2a3df5736810.asciidoc | 12 ++ .../17a1e308761afd3282f13d44d7be008a.asciidoc | 2 +- .../19c00c6b29bc7dbc5e92b3668da2da93.asciidoc | 37 +++--- .../1a7483796087053ba55029d0dc2ab356.asciidoc | 2 +- .../1a9efb56adb2cd84faa9825a129381b9.asciidoc | 2 +- .../1ead35c954963e83f89872048dabdbe9.asciidoc | 21 +++ .../1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc | 2 +- .../22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc | 2 +- .../272e27bf1fcc4fe5dbd4092679dd0342.asciidoc | 11 ++ .../2891aa10ee9d474780adf94d5607f2db.asciidoc | 2 +- .../29aeabacb1fdf5b083d5f091b6d1bd44.asciidoc | 15 +++ .../2a1eece9a59ac1773edcf0a932c26de0.asciidoc | 11 +- .../2a71e2d7f7179dd76183d30789046808.asciidoc | 2 +- .../2afd49985950cbcccf727fa858d00067.asciidoc | 24 ++++ .../2afdf0d83724953aa2875b5fb37d60cc.asciidoc | 11 +- .../2b7687e3d7c06824950e00618c297864.asciidoc | 2 +- .../2bacdcb278705d944f367cfb984cf4d2.asciidoc | 2 +- .../2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc | 2 +- .../2ee002e60bd7a38d466e5f0eb0c38946.asciidoc | 2 +- .../2f72a63c73dd672ac2dc3997ad15dd41.asciidoc | 2 +- .../2f9ee29fe49f7d206a41212aa5945296.asciidoc | 22 ++++ .../2fa7ded8515b32f26c54394ea598f573.asciidoc | 2 +- .../31832bd71c31c46a1ccf8d1c210d89d4.asciidoc | 30 +++++ .../32123981430e5a8b34fe14314fc48429.asciidoc | 2 +- .../32c8c86702ccd68eb70f1573409c2a1f.asciidoc | 31 +++++ .../3649194a97d265a3bc758f8b38f7561e.asciidoc | 21 +++ ...36792c81c053e0555407d1e83e7e054f.asciidoc} | 7 +- .../3722dad876023e0757138dd5a6d3240e.asciidoc | 23 ++++ .../3a204b57072a104d9b50f3a9e064a8f6.asciidoc | 19 +++ .../3a2953fd81d65118a776c87a81530e15.asciidoc | 2 +- .../3a6238835c7d9f51e6d91f92885fadeb.asciidoc | 2 +- .../3bc4a3681e3ea9cb3de49f72085807d8.asciidoc | 65 ++++++++++ .../3bc872dbcdad8ff02cbaea39e7f38352.asciidoc | 2 +- .../3e278e6c193b4c17dbdc70670e15d78c.asciidoc | 2 +- .../3ea4c971b3f47735dcc207ee2645fa03.asciidoc | 2 +- .../3f1fe5f5f99b98d0891f38003e10b636.asciidoc | 11 +- .../3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc | 2 +- .../405511f7c1f12cc0a227b4563fe7b2e2.asciidoc | 5 +- .../40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc | 2 +- .../416a3ba11232d3c078c1c31340cf356f.asciidoc | 2 +- .../4301cb9d970ec65778f91ce1f438e0d5.asciidoc | 2 +- .../433cf45a23decdf3a096016ffaaf26ba.asciidoc | 2 +- .../43d9e314431336a6f084cea76dfd6489.asciidoc | 2 +- .../43e86fbaeed068dcc981214338559b5a.asciidoc | 2 +- .../443dd902f64b3217505c9595839c3b2d.asciidoc | 2 +- .../44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc | 2 +- .../45954b8aaedfed57012be8b6538b0a24.asciidoc | 67 +++++----- .../46b771a9932c3fa6057a7b2679c72ef0.asciidoc | 10 ++ .../4982c547be1ad9455ae836990aea92c5.asciidoc | 5 + .../4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc | 13 +- .../4de4bb55bbc0a76c75d256f245a3ee3f.asciidoc | 17 +++ .../4f621ab694f62ddb89e0684a9e76c4d1.asciidoc | 2 +- .../4ff2dcec03fe097075cf1d174a019a1f.asciidoc | 2 +- .../532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc | 2 +- .../537bce129338d9227bccb6a0283dab45.asciidoc | 12 ++ .../57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc | 13 +- .../5969c446688c8b326acc80276573e9d2.asciidoc | 2 +- .../59aa5216630f80c5dc298fc5bba4a819.asciidoc | 10 ++ .../5b2a13366bd4e1ab4b25d04d360570dc.asciidoc | 2 +- .../5bba213a7f543190139d1a69ab2ed076.asciidoc | 17 +-- .../5ea9da129ca70a5fe534f27a82d80b29.asciidoc | 2 +- .../5f3549ac7fee94682ca0d7439eebdd2a.asciidoc | 2 +- .../615dc36f0978c676624fb7d1144b4899.asciidoc | 11 ++ .../642161d70dacf7d153767d37d3726838.asciidoc | 2 +- .../650a0fb27c66a790c4687267423af1da.asciidoc | 2 +- .../6636701d31b0c9eb8316f1f8e99cc918.asciidoc | 2 +- .../666c420fe61fa122386da3c356a64943.asciidoc | 2 +- .../66915e95b723ee2f6e5164a94b8f98c1.asciidoc | 12 ++ .../67b71a95b6fe6c83faae51ea038a1bf1.asciidoc | 10 ++ .../69541f0bb81ab3797926bb2a00607cda.asciidoc | 2 +- .../698e0a2b67ba7842caa801d9ef46ebe3.asciidoc | 2 +- .../69d5710bdec73041c66f21d5f96637e8.asciidoc | 2 +- ...6baf72c04d48cb04c2f8be609ff3b3b5.asciidoc} | 7 +- .../6ce8334def48552ba7d44025580d9105.asciidoc | 2 +- .../6dcd3916679f6aa64f79524c75991ebd.asciidoc | 2 +- .../6e498b9dc753b94abf2618c407fa5cd8.asciidoc | 16 +++ .../6e6b78e6b689a5d6aa637271b6d084e2.asciidoc | 2 +- .../6ea062455229151e311869a81ee40252.asciidoc | 2 +- .../6f3b723bf6179b96c3413597ed7f49e1.asciidoc | 15 +-- .../73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc | 2 +- .../744aeb2af40f519e430e21e004e3c3b7.asciidoc | 2 +- .../75e360d03fb416f0a65ca37c662c2e9c.asciidoc | 2 +- .../75e6d66e94e61bd8a555beaaee255c36.asciidoc | 2 +- .../76e02434835630cb830724beb92df354.asciidoc | 2 +- .../77518e8c6198acfe77c0934fd2fe65cb.asciidoc | 55 ++++---- .../78043831fd32004a82930c8ac8a1d809.asciidoc | 2 +- .../78e20b4cff470ed7357de1fd74bcfeb7.asciidoc | 2 +- .../79d206a528be704050a437adce2496dd.asciidoc | 2 +- .../7b5c231526846f2f7b98d78f3656ae6a.asciidoc | 2 +- .../7ba29f0be2297b54a640b0a17d7ef5ca.asciidoc | 5 +- .../7bdc283b96c7a965fae23013647b8578.asciidoc | 2 +- .../7daff6b7e668ab8a762b8ab5dff7a167.asciidoc | 2 +- .../7f2d511cb64743c006225e5933a14bb4.asciidoc | 2 +- .../7fde3ff91c4a2e7080444af37d5cd287.asciidoc | 2 +- .../80dd7f5882c59b9c1c90e8351937441f.asciidoc | 61 ++++----- .../828f0045747fde4888a947bb99e190e3.asciidoc | 2 +- .../82bb6c61dab959f4446dc5ecab7ecbdf.asciidoc | 51 ++++---- .../84465de841fe5c6099a0382f786f2cb8.asciidoc | 2 +- .../853fc710cea79fb4e1a85fb6d149f9c5.asciidoc | 2 +- .../8621c05cc7cf3880bde751f6670a0c3a.asciidoc | 15 +++ .../87457bb3467484bec3e9df4e25942ba6.asciidoc | 2 +- .../88b19973b970adf9b73fca82017d4951.asciidoc | 2 +- .../89f547649895176c246bb8c41313ff21.asciidoc | 15 +++ .../8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc | 2 +- .../8b144b3eb20872595fd7cbc6c245c7c8.asciidoc | 12 -- .../8c47c80139f40f25db44f5781ca2dfbe.asciidoc | 10 ++ .../9169d19a80175ec94f80865d0f9bef4c.asciidoc | 2 +- .../91e106a2affbc8df32cd940684a779ed.asciidoc | 8 +- .../927b20a221f975b75d1227b67d0eb7e2.asciidoc | 2 +- .../944806221eb89f5af2298ccdf2902277.asciidoc | 2 +- .../947efe87db7f8813c0878f8affc3e2d1.asciidoc | 8 ++ .../948418e0ef1b7e7cfee2f11be715d7d2.asciidoc | 2 +- .../95c1b376652533c352bbf793c74d1b08.asciidoc | 2 +- .../971fd23adb81bb5842c7750e0379336a.asciidoc | 2 +- .../97c6c07f46f4177f0565a04bc50924a3.asciidoc | 2 +- .../991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc | 2 +- .../99fb82d49ac477e6a9dfdd71f9465374.asciidoc | 5 +- .../9afa0844883b7471883aa378a8dd10b4.asciidoc | 9 +- .../9beb260834f8cfb240f6308950dbb9c2.asciidoc | 2 +- .../9c01db07c9ac395b6370e3b33965c21f.asciidoc | 15 +-- .../9de4edafd22a8b9cb557632b2c8779cd.asciidoc | 2 +- .../a00311843b5f8f3e9f7d511334a828b1.asciidoc | 2 +- .../a162eb50853331c80596f5994e9d1c38.asciidoc | 12 +- .../a1dda7e7c01be96a4acf7b725d70385f.asciidoc | 2 +- .../a34e758e019f563d323ca90ad9fd6e3e.asciidoc | 2 +- .../a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc | 2 +- .../a46f566ca031375658c22f89b87dc6d2.asciidoc | 12 ++ .../a60aaed30d7d26eaacbb2c0ed4ddc66d.asciidoc | 10 ++ .../a675fafa7c688cb3ea1be09bf887ebf0.asciidoc | 12 ++ .../a9554396506888e392a1aee0ca28e6fc.asciidoc | 2 +- .../a95a123b9f862e52ab1e8f875961c852.asciidoc | 2 +- .../a9f14efc26fdd3c37a71f06c310163d9.asciidoc | 2 +- .../ac22cc2b0f4ad659055feed2852a2d59.asciidoc | 2 +- .../acb10091ad335ddd15d71021aaf23c62.asciidoc | 2 +- .../adced6e22ef03c2ae3b14aa5bdd24fd9.asciidoc | 10 ++ .../aee4734ee63dbbbd12a21ee886f7a829.asciidoc | 2 +- .../b0bddf2ffaa83049b195829c06b875cd.asciidoc | 5 +- .../b1e81b70b874a1f0cf75a0ec6e430ddc.asciidoc | 10 ++ .../b583bf8d3a2f49d633aa2cfed5606418.asciidoc | 2 +- .../b5bc1bb7278f2f95bc54790c78c928e0.asciidoc | 2 +- .../b607eea422295a3e9acd75f9ed1c8cb7.asciidoc | 2 +- .../b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc | 10 +- ...ba0e7e0b18fc9ec6c623d40186d1f61b.asciidoc} | 3 +- .../bb2ba5d1885f87506f90dbb002e518f4.asciidoc | 2 +- ...bcd1afb793240b1dddd9fa5d3f21192b.asciidoc} | 10 +- .../bcdfaa4487747249699a86a0dcd22f5e.asciidoc | 53 ++++---- .../be5fef0640c3a650ee96f84e3376a1be.asciidoc | 2 +- .../bf1de9fa1b825fa875d27fa08821a6d1.asciidoc | 2 +- .../bf3f520b47581d861e802730aaf2a519.asciidoc | 2 +- .../c147de68fd6da032ad4a3c1bf626f5d6.asciidoc | 2 +- .../c3b77e11b16e37e9e37e28dec922432e.asciidoc | 10 ++ .../c4607ca79b2bcde39305d6f4f21cad37.asciidoc | 2 +- .../c580990a70028bb49cca8a6bde86bbf6.asciidoc | 17 +-- .../c6339d09f85000a6432304b0ec63b8f6.asciidoc | 2 +- .../ca5dda98e977125d40a7fe1e178e213f.asciidoc | 2 +- .../cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc | 2 +- .../ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc | 121 +++++++++--------- .../cd7da0c3769682f546cc1888e569382e.asciidoc | 2 +- .../d1d8b6e642db1a7c70dbbf0fe6d8e92d.asciidoc | 2 +- .../d2e7dead222cfbebbd2c21a7cc1893b4.asciidoc | 11 ++ .../d35c8cf7a98b3f112e1de8797ec6689d.asciidoc | 11 +- .../d3a0f648d0fd50b54a4e9ebe363c5047.asciidoc | 48 +++++++ .../d4df39f72d3a3b80cd4042f6a21c3f19.asciidoc | 8 +- .../d6a4548b29e939fb197189c20c7c016f.asciidoc | 17 +++ .../d8c053ee26c1533ce936ec81101d8e1b.asciidoc | 5 +- .../d93d52b6057a7aff3d0766ca44c505e0.asciidoc | 2 +- .../dd16c9c981551c9da47ebb5ef5105fa0.asciidoc | 57 +++++++++ .../dd71b0c9f9197684ff29c61062c55660.asciidoc | 5 +- .../dddb6a6ebd145f8411c5b4910d332f87.asciidoc | 2 +- .../dde92fdf3469349ffe2c81764333543a.asciidoc | 14 ++ .../de139866a220124360e5e27d1a736ea4.asciidoc | 2 +- .../e3019fd5f23458ae49ad9854c97d321c.asciidoc | 9 +- .../e4b38973c74037335378d8480f1ce894.asciidoc | 59 ++++----- .../e6ccd979c34ba03007e625c6ec3e71a9.asciidoc | 2 +- .../e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc | 2 +- .../e6faae2e272ee57727f38e55a3de5bb2.asciidoc | 2 +- .../e715fb8c792bf09ac98f0ceca99beb84.asciidoc | 10 ++ .../e93ff228ab3e63738e1c83fdfb7424b9.asciidoc | 2 +- .../eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc | 2 +- .../ec135f0cc0d3f526df68000b2a95c65b.asciidoc | 12 ++ .../ed5c3b45e8de912faba44507d827eb93.asciidoc | 2 +- .../edae616e1244babf6032aecc6aaaf836.asciidoc | 2 +- .../edb25dc0162b039d477cb06aed2d6275.asciidoc | 2 +- .../ee08328cd157d547de19b4abe867b23e.asciidoc | 2 +- .../f29b2674299ddf51a25ed87619025ede.asciidoc | 2 +- .../f39512478cae2db8f4566a1e4af9e8f5.asciidoc | 2 +- .../f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc | 2 +- ...f994498dd6576be657dedce2822d2b9e.asciidoc} | 9 +- .../fbb38243221c8fb311660616e3add9ce.asciidoc | 2 +- .../fe208d94ec93eabf3bd06139fa70701e.asciidoc | 2 +- .../fe3a927d868cbc530e08e05964d5174a.asciidoc | 2 +- ...ffda10edaa7ce087703193c3cb95a426.asciidoc} | 18 ++- docs/guide/release-notes.asciidoc | 13 ++ elasticsearch/_version.py | 2 +- .../generate-docs-examples/package-lock.json | 93 ++------------ 215 files changed, 1278 insertions(+), 705 deletions(-) create mode 100644 docs/examples/00ad41bde67beac991534ae0e04b1296.asciidoc create mode 100644 docs/examples/0f028f71f04c1d569fab402869565a84.asciidoc create mode 100644 docs/examples/12adea5d76f73d94d80d42f53f67563f.asciidoc create mode 100644 docs/examples/13d91782399ba1f291e103c18b5338cc.asciidoc create mode 100644 docs/examples/15ac33d641b376d9494075eb1f0d4066.asciidoc create mode 100644 docs/examples/174b93c323aa8e9cc8ee2a3df5736810.asciidoc create mode 100644 docs/examples/1ead35c954963e83f89872048dabdbe9.asciidoc create mode 100644 docs/examples/272e27bf1fcc4fe5dbd4092679dd0342.asciidoc create mode 100644 docs/examples/29aeabacb1fdf5b083d5f091b6d1bd44.asciidoc create mode 100644 docs/examples/2afd49985950cbcccf727fa858d00067.asciidoc create mode 100644 docs/examples/2f9ee29fe49f7d206a41212aa5945296.asciidoc create mode 100644 docs/examples/31832bd71c31c46a1ccf8d1c210d89d4.asciidoc create mode 100644 docs/examples/32c8c86702ccd68eb70f1573409c2a1f.asciidoc create mode 100644 docs/examples/3649194a97d265a3bc758f8b38f7561e.asciidoc rename docs/examples/{37f367ca81a16d3aef4ef7126ec33a2e.asciidoc => 36792c81c053e0555407d1e83e7e054f.asciidoc} (93%) create mode 100644 docs/examples/3722dad876023e0757138dd5a6d3240e.asciidoc create mode 100644 docs/examples/3a204b57072a104d9b50f3a9e064a8f6.asciidoc create mode 100644 docs/examples/3bc4a3681e3ea9cb3de49f72085807d8.asciidoc create mode 100644 docs/examples/46b771a9932c3fa6057a7b2679c72ef0.asciidoc create mode 100644 docs/examples/4de4bb55bbc0a76c75d256f245a3ee3f.asciidoc create mode 100644 docs/examples/537bce129338d9227bccb6a0283dab45.asciidoc create mode 100644 docs/examples/59aa5216630f80c5dc298fc5bba4a819.asciidoc create mode 100644 docs/examples/615dc36f0978c676624fb7d1144b4899.asciidoc create mode 100644 docs/examples/66915e95b723ee2f6e5164a94b8f98c1.asciidoc create mode 100644 docs/examples/67b71a95b6fe6c83faae51ea038a1bf1.asciidoc rename docs/examples/{d29031409016b2b798148ef173a196ae.asciidoc => 6baf72c04d48cb04c2f8be609ff3b3b5.asciidoc} (73%) create mode 100644 docs/examples/6e498b9dc753b94abf2618c407fa5cd8.asciidoc create mode 100644 docs/examples/8621c05cc7cf3880bde751f6670a0c3a.asciidoc create mode 100644 docs/examples/89f547649895176c246bb8c41313ff21.asciidoc delete mode 100644 docs/examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc create mode 100644 docs/examples/8c47c80139f40f25db44f5781ca2dfbe.asciidoc create mode 100644 docs/examples/947efe87db7f8813c0878f8affc3e2d1.asciidoc create mode 100644 docs/examples/a46f566ca031375658c22f89b87dc6d2.asciidoc create mode 100644 docs/examples/a60aaed30d7d26eaacbb2c0ed4ddc66d.asciidoc create mode 100644 docs/examples/a675fafa7c688cb3ea1be09bf887ebf0.asciidoc create mode 100644 docs/examples/adced6e22ef03c2ae3b14aa5bdd24fd9.asciidoc create mode 100644 docs/examples/b1e81b70b874a1f0cf75a0ec6e430ddc.asciidoc rename docs/examples/{357edc9d10e98ed776401c7a439a1a55.asciidoc => ba0e7e0b18fc9ec6c623d40186d1f61b.asciidoc} (78%) rename docs/examples/{436d50b85fc8f0977d02059eec00719b.asciidoc => bcd1afb793240b1dddd9fa5d3f21192b.asciidoc} (52%) create mode 100644 docs/examples/c3b77e11b16e37e9e37e28dec922432e.asciidoc create mode 100644 docs/examples/d2e7dead222cfbebbd2c21a7cc1893b4.asciidoc create mode 100644 docs/examples/d3a0f648d0fd50b54a4e9ebe363c5047.asciidoc create mode 100644 docs/examples/d6a4548b29e939fb197189c20c7c016f.asciidoc create mode 100644 docs/examples/dd16c9c981551c9da47ebb5ef5105fa0.asciidoc create mode 100644 docs/examples/dde92fdf3469349ffe2c81764333543a.asciidoc create mode 100644 docs/examples/e715fb8c792bf09ac98f0ceca99beb84.asciidoc create mode 100644 docs/examples/ec135f0cc0d3f526df68000b2a95c65b.asciidoc rename docs/examples/{9ad0864bcd665b63551e944653d32423.asciidoc => f994498dd6576be657dedce2822d2b9e.asciidoc} (82%) rename docs/examples/{681d24c2633f598fc43d6afff8996dbb.asciidoc => ffda10edaa7ce087703193c3cb95a426.asciidoc} (90%) diff --git a/docs/examples/00ad41bde67beac991534ae0e04b1296.asciidoc b/docs/examples/00ad41bde67beac991534ae0e04b1296.asciidoc new file mode 100644 index 000000000..b806eedf1 --- /dev/null +++ b/docs/examples/00ad41bde67beac991534ae0e04b1296.asciidoc @@ -0,0 +1,11 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/data-stream-reindex.asciidoc:273 + +[source, python] +---- +resp = client.indices.get_data_stream( + name="my-data-stream", + filter_path="data_streams.indices.index_name", +) +print(resp) +---- diff --git a/docs/examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc b/docs/examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc index 78636bc7a..1930760fd 100644 --- a/docs/examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc +++ b/docs/examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:801 +// search/search-your-data/retrievers-examples.asciidoc:1051 [source, python] ---- diff --git a/docs/examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc b/docs/examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc index 749e89a02..b716f8df7 100644 --- a/docs/examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc +++ b/docs/examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:1113 +// search/search-your-data/retrievers-examples.asciidoc:1363 [source, python] ---- diff --git a/docs/examples/016f3147dae9ff2c3e831257ae470361.asciidoc b/docs/examples/016f3147dae9ff2c3e831257ae470361.asciidoc index b1bdb6ee6..299997ce4 100644 --- a/docs/examples/016f3147dae9ff2c3e831257ae470361.asciidoc +++ b/docs/examples/016f3147dae9ff2c3e831257ae470361.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:52 +// alias.asciidoc:54 [source, python] ---- diff --git a/docs/examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc b/docs/examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc index b0675f45b..7d37ed747 100644 --- a/docs/examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc +++ b/docs/examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/index-templates.asciidoc:84 +// indices/index-templates.asciidoc:86 [source, python] ---- diff --git a/docs/examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc b/docs/examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc index 2479ec8bb..77db1349e 100644 --- a/docs/examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc +++ b/docs/examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:562 +// search/search-your-data/retrievers-examples.asciidoc:812 [source, python] ---- diff --git a/docs/examples/0bcd380315ef4691b8c79df6ca53a85f.asciidoc b/docs/examples/0bcd380315ef4691b8c79df6ca53a85f.asciidoc index 75c29429f..124a36052 100644 --- a/docs/examples/0bcd380315ef4691b8c79df6ca53a85f.asciidoc +++ b/docs/examples/0bcd380315ef4691b8c79df6ca53a85f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:395 +// search/search-your-data/sort-search-results.asciidoc:397 [source, python] ---- diff --git a/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc b/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc index 3cc5e8efb..5ef14fcc9 100644 --- a/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc +++ b/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc @@ -1,19 +1,12 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-across-clusters.asciidoc:192 +// esql/esql-across-clusters.asciidoc:194 [source, python] ---- -resp = client.perform_request( - "POST", - "/_query/async", - params={ - "format": "json" - }, - headers={"Content-Type": "application/json"}, - body={ - "query": "\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ", - "include_ccs_metadata": True - }, +resp = client.esql.async_query( + format="json", + query="\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ", + include_ccs_metadata=True, ) print(resp) ---- diff --git a/docs/examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc b/docs/examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc index 816c0d5bb..89f2a7eeb 100644 --- a/docs/examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc +++ b/docs/examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:941 +// search/search-your-data/retrievers-examples.asciidoc:1191 [source, python] ---- diff --git a/docs/examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc b/docs/examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc index 285b99308..eb746abe3 100644 --- a/docs/examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc +++ b/docs/examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc @@ -3,24 +3,20 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_application/search_application/my-app/_render_query", - headers={"Content-Type": "application/json"}, - body={ - "params": { - "query_string": "my first query", - "text_fields": [ - { - "name": "title", - "boost": 5 - }, - { - "name": "description", - "boost": 1 - } - ] - } +resp = client.search_application.render_query( + name="my-app", + params={ + "query_string": "my first query", + "text_fields": [ + { + "name": "title", + "boost": 5 + }, + { + "name": "description", + "boost": 1 + } + ] }, ) print(resp) diff --git a/docs/examples/0f028f71f04c1d569fab402869565a84.asciidoc b/docs/examples/0f028f71f04c1d569fab402869565a84.asciidoc new file mode 100644 index 000000000..295df000b --- /dev/null +++ b/docs/examples/0f028f71f04c1d569fab402869565a84.asciidoc @@ -0,0 +1,15 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:476 + +[source, python] +---- +resp = client.indices.put_settings( + index=".reindexed-v9-ml-anomalies-custom-example", + settings={ + "index": { + "number_of_replicas": "" + } + }, +) +print(resp) +---- diff --git a/docs/examples/0f2e5e006b663a88ee99b130ab1b4844.asciidoc b/docs/examples/0f2e5e006b663a88ee99b130ab1b4844.asciidoc index c32fb4f97..9b52aa31d 100644 --- a/docs/examples/0f2e5e006b663a88ee99b130ab1b4844.asciidoc +++ b/docs/examples/0f2e5e006b663a88ee99b130ab1b4844.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:570 +// search/search-your-data/sort-search-results.asciidoc:572 [source, python] ---- diff --git a/docs/examples/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc b/docs/examples/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc index 5021fce0e..308c9612e 100644 --- a/docs/examples/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc +++ b/docs/examples/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// aggregations/metrics/scripted-metric-aggregation.asciidoc:61 +// aggregations/metrics/scripted-metric-aggregation.asciidoc:63 [source, python] ---- diff --git a/docs/examples/1147a02afa087278e51fa365fb9e06b7.asciidoc b/docs/examples/1147a02afa087278e51fa365fb9e06b7.asciidoc index 6f2b83e31..6b9ea7a99 100644 --- a/docs/examples/1147a02afa087278e51fa365fb9e06b7.asciidoc +++ b/docs/examples/1147a02afa087278e51fa365fb9e06b7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// api-conventions.asciidoc:345 +// api-conventions.asciidoc:355 [source, python] ---- diff --git a/docs/examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc b/docs/examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc index 9e854328d..88bee88b3 100644 --- a/docs/examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc +++ b/docs/examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:455 +// search/search-your-data/highlighting.asciidoc:467 [source, python] ---- diff --git a/docs/examples/120fcf9f55128d6a81d5e87a9c235bbd.asciidoc b/docs/examples/120fcf9f55128d6a81d5e87a9c235bbd.asciidoc index 5fb759d64..dd2c9dc6b 100644 --- a/docs/examples/120fcf9f55128d6a81d5e87a9c235bbd.asciidoc +++ b/docs/examples/120fcf9f55128d6a81d5e87a9c235bbd.asciidoc @@ -1,21 +1,18 @@ // This file is autogenerated, DO NOT EDIT -// inference/chat-completion-inference.asciidoc:301 +// inference/chat-completion-inference.asciidoc:305 [source, python] ---- -resp = client.perform_request( - "POST", - "/_inference/chat_completion/openai-completion/_stream", - headers={"Content-Type": "application/json"}, - body={ - "model": "gpt-4o", - "messages": [ - { - "role": "user", - "content": "What is Elastic?" - } - ] - }, +resp = client.inference.stream_inference( + task_type="chat_completion", + inference_id="openai-completion", + model="gpt-4o", + messages=[ + { + "role": "user", + "content": "What is Elastic?" + } + ], ) print(resp) ---- diff --git a/docs/examples/12adea5d76f73d94d80d42f53f67563f.asciidoc b/docs/examples/12adea5d76f73d94d80d42f53f67563f.asciidoc new file mode 100644 index 000000000..18270ad1c --- /dev/null +++ b/docs/examples/12adea5d76f73d94d80d42f53f67563f.asciidoc @@ -0,0 +1,11 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:393 + +[source, python] +---- +resp = client.indices.add_block( + index=".ml-anomalies-custom-example", + block="read_only", +) +print(resp) +---- diff --git a/docs/examples/13d91782399ba1f291e103c18b5338cc.asciidoc b/docs/examples/13d91782399ba1f291e103c18b5338cc.asciidoc new file mode 100644 index 000000000..248cdff9a --- /dev/null +++ b/docs/examples/13d91782399ba1f291e103c18b5338cc.asciidoc @@ -0,0 +1,25 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/create-index-from-source.asciidoc:94 + +[source, python] +---- +resp = client.indices.create_from( + source="my-index", + dest="my-new-index", + create_from={ + "settings_override": { + "index": { + "number_of_shards": 5 + } + }, + "mappings_override": { + "properties": { + "field2": { + "type": "boolean" + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/141ef0ebaa3b0772892b79b9bb85efb0.asciidoc b/docs/examples/141ef0ebaa3b0772892b79b9bb85efb0.asciidoc index 11d594a0f..c6cd62c44 100644 --- a/docs/examples/141ef0ebaa3b0772892b79b9bb85efb0.asciidoc +++ b/docs/examples/141ef0ebaa3b0772892b79b9bb85efb0.asciidoc @@ -3,9 +3,8 @@ [source, python] ---- -resp = client.inference.put( - task_type="my-inference-endpoint", - inference_id="_update", +resp = client.inference.update( + inference_id="my-inference-endpoint", inference_config={ "service_settings": { "api_key": "" diff --git a/docs/examples/15ac33d641b376d9494075eb1f0d4066.asciidoc b/docs/examples/15ac33d641b376d9494075eb1f0d4066.asciidoc new file mode 100644 index 000000000..b6c8f58d1 --- /dev/null +++ b/docs/examples/15ac33d641b376d9494075eb1f0d4066.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/data-stream-reindex.asciidoc:224 + +[source, python] +---- +resp = client.indices.cancel_migrate_reindex( + index="my-data-stream", +) +print(resp) +---- diff --git a/docs/examples/174b93c323aa8e9cc8ee2a3df5736810.asciidoc b/docs/examples/174b93c323aa8e9cc8ee2a3df5736810.asciidoc new file mode 100644 index 000000000..db5b5eda0 --- /dev/null +++ b/docs/examples/174b93c323aa8e9cc8ee2a3df5736810.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// rest-api/security/delegate-pki-authentication.asciidoc:83 + +[source, python] +---- +resp = client.security.delegate_pki( + x509_certificate_chain=[ + "MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==" + ], +) +print(resp) +---- diff --git a/docs/examples/17a1e308761afd3282f13d44d7be008a.asciidoc b/docs/examples/17a1e308761afd3282f13d44d7be008a.asciidoc index ee6770cd1..4fcdf8ed5 100644 --- a/docs/examples/17a1e308761afd3282f13d44d7be008a.asciidoc +++ b/docs/examples/17a1e308761afd3282f13d44d7be008a.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:687 +// search/search-your-data/highlighting.asciidoc:699 [source, python] ---- diff --git a/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc b/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc index 3f54b088b..0789a399a 100644 --- a/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc +++ b/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc @@ -3,28 +3,23 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_ingest/_simulate", - headers={"Content-Type": "application/json"}, - body={ - "docs": [ - { - "_index": "my-index", - "_id": "123", - "_source": { - "foo": "bar" - } - }, - { - "_index": "my-index", - "_id": "456", - "_source": { - "foo": "rab" - } +resp = client.simulate.ingest( + docs=[ + { + "_index": "my-index", + "_id": "123", + "_source": { + "foo": "bar" } - ] - }, + }, + { + "_index": "my-index", + "_id": "456", + "_source": { + "foo": "rab" + } + } + ], ) print(resp) ---- diff --git a/docs/examples/1a7483796087053ba55029d0dc2ab356.asciidoc b/docs/examples/1a7483796087053ba55029d0dc2ab356.asciidoc index cd3f38242..c48bf98b9 100644 --- a/docs/examples/1a7483796087053ba55029d0dc2ab356.asciidoc +++ b/docs/examples/1a7483796087053ba55029d0dc2ab356.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:187 +// esql/multivalued-fields.asciidoc:191 [source, python] ---- diff --git a/docs/examples/1a9efb56adb2cd84faa9825a129381b9.asciidoc b/docs/examples/1a9efb56adb2cd84faa9825a129381b9.asciidoc index 870811976..e0d883c89 100644 --- a/docs/examples/1a9efb56adb2cd84faa9825a129381b9.asciidoc +++ b/docs/examples/1a9efb56adb2cd84faa9825a129381b9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/apis/rollup-search.asciidoc:219 +// rollup/apis/rollup-search.asciidoc:222 [source, python] ---- diff --git a/docs/examples/1ead35c954963e83f89872048dabdbe9.asciidoc b/docs/examples/1ead35c954963e83f89872048dabdbe9.asciidoc new file mode 100644 index 000000000..dc8dd1106 --- /dev/null +++ b/docs/examples/1ead35c954963e83f89872048dabdbe9.asciidoc @@ -0,0 +1,21 @@ +// This file is autogenerated, DO NOT EDIT +// rest-api/security/query-role.asciidoc:137 + +[source, python] +---- +resp = client.security.query_role( + query={ + "bool": { + "must_not": { + "term": { + "metadata._reserved": True + } + } + } + }, + sort=[ + "name" + ], +) +print(resp) +---- diff --git a/docs/examples/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc b/docs/examples/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc index 6456d8322..7de69a88a 100644 --- a/docs/examples/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc +++ b/docs/examples/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:61 +// search/search-your-data/sort-search-results.asciidoc:63 [source, python] ---- diff --git a/docs/examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc b/docs/examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc index 496e9e9b5..45a2461c9 100644 --- a/docs/examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc +++ b/docs/examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:313 +// search/search-your-data/sort-search-results.asciidoc:315 [source, python] ---- diff --git a/docs/examples/272e27bf1fcc4fe5dbd4092679dd0342.asciidoc b/docs/examples/272e27bf1fcc4fe5dbd4092679dd0342.asciidoc new file mode 100644 index 000000000..f7955285c --- /dev/null +++ b/docs/examples/272e27bf1fcc4fe5dbd4092679dd0342.asciidoc @@ -0,0 +1,11 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:604 + +[source, python] +---- +resp = client.indices.add_block( + index=".ml-anomalies-custom-example", + block="write", +) +print(resp) +---- diff --git a/docs/examples/2891aa10ee9d474780adf94d5607f2db.asciidoc b/docs/examples/2891aa10ee9d474780adf94d5607f2db.asciidoc index fe88b0dff..fc9780c02 100644 --- a/docs/examples/2891aa10ee9d474780adf94d5607f2db.asciidoc +++ b/docs/examples/2891aa10ee9d474780adf94d5607f2db.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:175 +// search/search-your-data/sort-search-results.asciidoc:177 [source, python] ---- diff --git a/docs/examples/29aeabacb1fdf5b083d5f091b6d1bd44.asciidoc b/docs/examples/29aeabacb1fdf5b083d5f091b6d1bd44.asciidoc new file mode 100644 index 000000000..8fd8db4c8 --- /dev/null +++ b/docs/examples/29aeabacb1fdf5b083d5f091b6d1bd44.asciidoc @@ -0,0 +1,15 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/data-stream-reindex.asciidoc:105 + +[source, python] +---- +resp = client.indices.migrate_reindex( + reindex={ + "source": { + "index": "my-data-stream" + }, + "mode": "upgrade" + }, +) +print(resp) +---- diff --git a/docs/examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc b/docs/examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc index e8c3ee1d2..d3fe44432 100644 --- a/docs/examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc +++ b/docs/examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc @@ -3,14 +3,9 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_security/oidc/logout", - headers={"Content-Type": "application/json"}, - body={ - "token": "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", - "refresh_token": "vLBPvmAB6KvwvJZr27cS" - }, +resp = client.security.oidc_logout( + token="dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", + refresh_token="vLBPvmAB6KvwvJZr27cS", ) print(resp) ---- diff --git a/docs/examples/2a71e2d7f7179dd76183d30789046808.asciidoc b/docs/examples/2a71e2d7f7179dd76183d30789046808.asciidoc index 9d9d7f53e..3e5c29b2d 100644 --- a/docs/examples/2a71e2d7f7179dd76183d30789046808.asciidoc +++ b/docs/examples/2a71e2d7f7179dd76183d30789046808.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:219 +// esql/multivalued-fields.asciidoc:224 [source, python] ---- diff --git a/docs/examples/2afd49985950cbcccf727fa858d00067.asciidoc b/docs/examples/2afd49985950cbcccf727fa858d00067.asciidoc new file mode 100644 index 000000000..19ceadeaa --- /dev/null +++ b/docs/examples/2afd49985950cbcccf727fa858d00067.asciidoc @@ -0,0 +1,24 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/types/semantic-text.asciidoc:159 + +[source, python] +---- +resp = client.indices.create( + index="test-index", + query={ + "match": { + "my_field": "Which country is Paris in?" + } + }, + highlight={ + "fields": { + "my_field": { + "type": "semantic", + "number_of_fragments": 2, + "order": "score" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc b/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc index f074730ed..2a307f890 100644 --- a/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc +++ b/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc @@ -1,14 +1,11 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:383 +// esql/esql-rest.asciidoc:384 [source, python] ---- -resp = client.perform_request( - "GET", - "/_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - params={ - "wait_for_completion_timeout": "30s" - }, +resp = client.esql.async_query_get( + id="FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", + wait_for_completion_timeout="30s", ) print(resp) ---- diff --git a/docs/examples/2b7687e3d7c06824950e00618c297864.asciidoc b/docs/examples/2b7687e3d7c06824950e00618c297864.asciidoc index 15d07ba55..6c9103348 100644 --- a/docs/examples/2b7687e3d7c06824950e00618c297864.asciidoc +++ b/docs/examples/2b7687e3d7c06824950e00618c297864.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/resolve-cluster.asciidoc:179 +// indices/resolve-cluster.asciidoc:205 [source, python] ---- diff --git a/docs/examples/2bacdcb278705d944f367cfb984cf4d2.asciidoc b/docs/examples/2bacdcb278705d944f367cfb984cf4d2.asciidoc index 3d9506a77..e5f183126 100644 --- a/docs/examples/2bacdcb278705d944f367cfb984cf4d2.asciidoc +++ b/docs/examples/2bacdcb278705d944f367cfb984cf4d2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:30 +// search/search-your-data/sort-search-results.asciidoc:32 [source, python] ---- diff --git a/docs/examples/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc b/docs/examples/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc index 88454fbda..2c16c93b6 100644 --- a/docs/examples/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc +++ b/docs/examples/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/match-phrase-query.asciidoc:30 +// query-dsl/match-phrase-query.asciidoc:66 [source, python] ---- diff --git a/docs/examples/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc b/docs/examples/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc index 0da4d008c..6fd68fa15 100644 --- a/docs/examples/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc +++ b/docs/examples/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:373 +// alias.asciidoc:375 [source, python] ---- diff --git a/docs/examples/2f72a63c73dd672ac2dc3997ad15dd41.asciidoc b/docs/examples/2f72a63c73dd672ac2dc3997ad15dd41.asciidoc index 57193131c..a5cb08edb 100644 --- a/docs/examples/2f72a63c73dd672ac2dc3997ad15dd41.asciidoc +++ b/docs/examples/2f72a63c73dd672ac2dc3997ad15dd41.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/semantic-text.asciidoc:216 +// mapping/types/semantic-text.asciidoc:242 [source, python] ---- diff --git a/docs/examples/2f9ee29fe49f7d206a41212aa5945296.asciidoc b/docs/examples/2f9ee29fe49f7d206a41212aa5945296.asciidoc new file mode 100644 index 000000000..ec5c59702 --- /dev/null +++ b/docs/examples/2f9ee29fe49f7d206a41212aa5945296.asciidoc @@ -0,0 +1,22 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/create-index-from-source.asciidoc:117 + +[source, python] +---- +resp = client.indices.create_from( + source="my-index", + dest="my-new-index", + create_from={ + "settings_override": { + "index": { + "blocks.write": None, + "blocks.read": None, + "blocks.read_only": None, + "blocks.read_only_allow_delete": None, + "blocks.metadata": None + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/2fa7ded8515b32f26c54394ea598f573.asciidoc b/docs/examples/2fa7ded8515b32f26c54394ea598f573.asciidoc index a444a667b..bc1835a56 100644 --- a/docs/examples/2fa7ded8515b32f26c54394ea598f573.asciidoc +++ b/docs/examples/2fa7ded8515b32f26c54394ea598f573.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/index-templates.asciidoc:121 +// indices/index-templates.asciidoc:123 [source, python] ---- diff --git a/docs/examples/31832bd71c31c46a1ccf8d1c210d89d4.asciidoc b/docs/examples/31832bd71c31c46a1ccf8d1c210d89d4.asciidoc new file mode 100644 index 000000000..367c6cad1 --- /dev/null +++ b/docs/examples/31832bd71c31c46a1ccf8d1c210d89d4.asciidoc @@ -0,0 +1,30 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/search-multiple-indices.asciidoc:51 + +[source, python] +---- +resp = client.search( + index="my-index-*", + query={ + "bool": { + "must": [ + { + "match": { + "user.id": "kimchy" + } + } + ], + "must_not": [ + { + "terms": { + "_index": [ + "my-index-01" + ] + } + } + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/32123981430e5a8b34fe14314fc48429.asciidoc b/docs/examples/32123981430e5a8b34fe14314fc48429.asciidoc index 0b6646b9d..311b84ef4 100644 --- a/docs/examples/32123981430e5a8b34fe14314fc48429.asciidoc +++ b/docs/examples/32123981430e5a8b34fe14314fc48429.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/search-multiple-indices.asciidoc:11 +// search/search-your-data/search-multiple-indices.asciidoc:17 [source, python] ---- diff --git a/docs/examples/32c8c86702ccd68eb70f1573409c2a1f.asciidoc b/docs/examples/32c8c86702ccd68eb70f1573409c2a1f.asciidoc new file mode 100644 index 000000000..52477014c --- /dev/null +++ b/docs/examples/32c8c86702ccd68eb70f1573409c2a1f.asciidoc @@ -0,0 +1,31 @@ +// This file is autogenerated, DO NOT EDIT +// ilm/actions/ilm-searchable-snapshot.asciidoc:130 + +[source, python] +---- +resp = client.ilm.put_lifecycle( + name="my_policy", + policy={ + "phases": { + "hot": { + "actions": { + "rollover": { + "max_primary_shard_size": "50gb" + }, + "searchable_snapshot": { + "snapshot_repository": "backing_repo", + "replicate_for": "14d" + } + } + }, + "delete": { + "min_age": "28d", + "actions": { + "delete": {} + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/3649194a97d265a3bc758f8b38f7561e.asciidoc b/docs/examples/3649194a97d265a3bc758f8b38f7561e.asciidoc new file mode 100644 index 000000000..e2071f790 --- /dev/null +++ b/docs/examples/3649194a97d265a3bc758f8b38f7561e.asciidoc @@ -0,0 +1,21 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/semantic-text-hybrid-search:21 + +[source, python] +---- +resp = client.indices.create( + index="semantic-embeddings", + mappings={ + "properties": { + "semantic_text": { + "type": "semantic_text" + }, + "content": { + "type": "text", + "copy_to": "semantic_text" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/37f367ca81a16d3aef4ef7126ec33a2e.asciidoc b/docs/examples/36792c81c053e0555407d1e83e7e054f.asciidoc similarity index 93% rename from docs/examples/37f367ca81a16d3aef4ef7126ec33a2e.asciidoc rename to docs/examples/36792c81c053e0555407d1e83e7e054f.asciidoc index 32c67885f..4941727c4 100644 --- a/docs/examples/37f367ca81a16d3aef4ef7126ec33a2e.asciidoc +++ b/docs/examples/36792c81c053e0555407d1e83e7e054f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:429 +// search/retriever.asciidoc:452 [source, python] ---- @@ -9,10 +9,13 @@ resp = client.search( retriever={ "rescorer": { "rescore": { + "window_size": 50, "query": { - "window_size": 50, "rescore_query": { "script_score": { + "query": { + "match_all": {} + }, "script": { "source": "cosineSimilarity(params.queryVector, 'product-vector_final_stage') + 1.0", "params": { diff --git a/docs/examples/3722dad876023e0757138dd5a6d3240e.asciidoc b/docs/examples/3722dad876023e0757138dd5a6d3240e.asciidoc new file mode 100644 index 000000000..4346ba355 --- /dev/null +++ b/docs/examples/3722dad876023e0757138dd5a6d3240e.asciidoc @@ -0,0 +1,23 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/create-index-from-source.asciidoc:63 + +[source, python] +---- +resp = client.indices.create( + index="my-index", + settings={ + "index": { + "number_of_shards": 3, + "blocks.write": True + } + }, + mappings={ + "properties": { + "field1": { + "type": "text" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/3a204b57072a104d9b50f3a9e064a8f6.asciidoc b/docs/examples/3a204b57072a104d9b50f3a9e064a8f6.asciidoc new file mode 100644 index 000000000..6ebfa63af --- /dev/null +++ b/docs/examples/3a204b57072a104d9b50f3a9e064a8f6.asciidoc @@ -0,0 +1,19 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:620 + +[source, python] +---- +resp = client.search( + index=".ml-anomalies-custom-example", + size=0, + aggs={ + "job_ids": { + "terms": { + "field": "job_id", + "size": 100 + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/3a2953fd81d65118a776c87a81530e15.asciidoc b/docs/examples/3a2953fd81d65118a776c87a81530e15.asciidoc index 1264164ad..874f6e65e 100644 --- a/docs/examples/3a2953fd81d65118a776c87a81530e15.asciidoc +++ b/docs/examples/3a2953fd81d65118a776c87a81530e15.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:593 +// search/search-your-data/highlighting.asciidoc:605 [source, python] ---- diff --git a/docs/examples/3a6238835c7d9f51e6d91f92885fadeb.asciidoc b/docs/examples/3a6238835c7d9f51e6d91f92885fadeb.asciidoc index d35ef64ac..a5c22e4e2 100644 --- a/docs/examples/3a6238835c7d9f51e6d91f92885fadeb.asciidoc +++ b/docs/examples/3a6238835c7d9f51e6d91f92885fadeb.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:11 +// search/search-your-data/sort-search-results.asciidoc:13 [source, python] ---- diff --git a/docs/examples/3bc4a3681e3ea9cb3de49f72085807d8.asciidoc b/docs/examples/3bc4a3681e3ea9cb3de49f72085807d8.asciidoc new file mode 100644 index 000000000..b58b0609d --- /dev/null +++ b/docs/examples/3bc4a3681e3ea9cb3de49f72085807d8.asciidoc @@ -0,0 +1,65 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:321 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "linear": { + "retrievers": [ + { + "retriever": { + "standard": { + "query": { + "function_score": { + "query": { + "term": { + "topic": "ai" + } + }, + "functions": [ + { + "script_score": { + "script": { + "source": "doc['timestamp'].value.millis" + } + } + } + ], + "boost_mode": "replace" + } + }, + "sort": { + "timestamp": { + "order": "asc" + } + } + } + }, + "weight": 2, + "normalizer": "minmax" + }, + { + "retriever": { + "knn": { + "field": "vector", + "query_vector": [ + 0.23, + 0.67, + 0.89 + ], + "k": 3, + "num_candidates": 5 + } + }, + "weight": 1.5 + } + ], + "rank_window_size": 10 + } + }, + source=False, +) +print(resp) +---- diff --git a/docs/examples/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc b/docs/examples/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc index e1218aca3..5016d46ad 100644 --- a/docs/examples/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc +++ b/docs/examples/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:202 +// search/search-your-data/sort-search-results.asciidoc:204 [source, python] ---- diff --git a/docs/examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc b/docs/examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc index 5d41900e4..f0d41dfdc 100644 --- a/docs/examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc +++ b/docs/examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:642 +// search/search-your-data/highlighting.asciidoc:654 [source, python] ---- diff --git a/docs/examples/3ea4c971b3f47735dcc207ee2645fa03.asciidoc b/docs/examples/3ea4c971b3f47735dcc207ee2645fa03.asciidoc index 9aed3ad38..3a9ce3e68 100644 --- a/docs/examples/3ea4c971b3f47735dcc207ee2645fa03.asciidoc +++ b/docs/examples/3ea4c971b3f47735dcc207ee2645fa03.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:418 +// alias.asciidoc:420 [source, python] ---- diff --git a/docs/examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc b/docs/examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc index 1202241d6..fe24eccf5 100644 --- a/docs/examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc +++ b/docs/examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc @@ -3,14 +3,9 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_query/async", - headers={"Content-Type": "application/json"}, - body={ - "query": "\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", - "wait_for_completion_timeout": "2s" - }, +resp = client.esql.async_query( + query="\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", + wait_for_completion_timeout="2s", ) print(resp) ---- diff --git a/docs/examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc b/docs/examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc index a87fc4d6b..dc4fd9f52 100644 --- a/docs/examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc +++ b/docs/examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ilm/actions/ilm-searchable-snapshot.asciidoc:96 +// ilm/actions/ilm-searchable-snapshot.asciidoc:103 [source, python] ---- diff --git a/docs/examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc b/docs/examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc index 376f8c0f4..ef7fcf7e1 100644 --- a/docs/examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc +++ b/docs/examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc @@ -3,9 +3,8 @@ [source, python] ---- -resp = client.perform_request( - "GET", - "/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=", +resp = client.esql.async_query_get( + id="FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=", ) print(resp) ---- diff --git a/docs/examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc b/docs/examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc index 1cbdde427..9a580ba46 100644 --- a/docs/examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc +++ b/docs/examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:142 +// esql/multivalued-fields.asciidoc:145 [source, python] ---- diff --git a/docs/examples/416a3ba11232d3c078c1c31340cf356f.asciidoc b/docs/examples/416a3ba11232d3c078c1c31340cf356f.asciidoc index e8318037b..94459206c 100644 --- a/docs/examples/416a3ba11232d3c078c1c31340cf356f.asciidoc +++ b/docs/examples/416a3ba11232d3c078c1c31340cf356f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:475 +// search/search-your-data/highlighting.asciidoc:487 [source, python] ---- diff --git a/docs/examples/4301cb9d970ec65778f91ce1f438e0d5.asciidoc b/docs/examples/4301cb9d970ec65778f91ce1f438e0d5.asciidoc index 87313bc14..6c3d6250f 100644 --- a/docs/examples/4301cb9d970ec65778f91ce1f438e0d5.asciidoc +++ b/docs/examples/4301cb9d970ec65778f91ce1f438e0d5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:289 +// alias.asciidoc:291 [source, python] ---- diff --git a/docs/examples/433cf45a23decdf3a096016ffaaf26ba.asciidoc b/docs/examples/433cf45a23decdf3a096016ffaaf26ba.asciidoc index 5302d44a4..8bd263b9c 100644 --- a/docs/examples/433cf45a23decdf3a096016ffaaf26ba.asciidoc +++ b/docs/examples/433cf45a23decdf3a096016ffaaf26ba.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:394 +// alias.asciidoc:396 [source, python] ---- diff --git a/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc b/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc index 251530a9e..c1ec6eb7d 100644 --- a/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc +++ b/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:247 +// search/retriever.asciidoc:254 [source, python] ---- diff --git a/docs/examples/43e86fbaeed068dcc981214338559b5a.asciidoc b/docs/examples/43e86fbaeed068dcc981214338559b5a.asciidoc index d0a87d736..2363196a9 100644 --- a/docs/examples/43e86fbaeed068dcc981214338559b5a.asciidoc +++ b/docs/examples/43e86fbaeed068dcc981214338559b5a.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/resolve-cluster.asciidoc:89 +// indices/resolve-cluster.asciidoc:92 [source, python] ---- diff --git a/docs/examples/443dd902f64b3217505c9595839c3b2d.asciidoc b/docs/examples/443dd902f64b3217505c9595839c3b2d.asciidoc index 44612024a..b32cc324f 100644 --- a/docs/examples/443dd902f64b3217505c9595839c3b2d.asciidoc +++ b/docs/examples/443dd902f64b3217505c9595839c3b2d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/search-multiple-indices.asciidoc:104 +// search/search-your-data/search-multiple-indices.asciidoc:138 [source, python] ---- diff --git a/docs/examples/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc b/docs/examples/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc index f65120117..eb7296c56 100644 --- a/docs/examples/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc +++ b/docs/examples/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:144 +// search/search-your-data/sort-search-results.asciidoc:146 [source, python] ---- diff --git a/docs/examples/45954b8aaedfed57012be8b6538b0a24.asciidoc b/docs/examples/45954b8aaedfed57012be8b6538b0a24.asciidoc index 860441617..cdff938a9 100644 --- a/docs/examples/45954b8aaedfed57012be8b6538b0a24.asciidoc +++ b/docs/examples/45954b8aaedfed57012be8b6538b0a24.asciidoc @@ -1,47 +1,44 @@ // This file is autogenerated, DO NOT EDIT -// inference/chat-completion-inference.asciidoc:352 +// inference/chat-completion-inference.asciidoc:356 [source, python] ---- -resp = client.perform_request( - "POST", - "/_inference/chat_completion/openai-completion/_stream", - headers={"Content-Type": "application/json"}, - body={ - "messages": [ - { - "role": "user", - "content": [ - { - "type": "text", - "text": "What's the price of a scarf?" - } - ] - } - ], - "tools": [ - { - "type": "function", - "function": { - "name": "get_current_price", - "description": "Get the current price of a item", - "parameters": { - "type": "object", - "properties": { - "item": { - "id": "123" - } - } - } +resp = client.inference.stream_inference( + task_type="chat_completion", + inference_id="openai-completion", + messages=[ + { + "role": "user", + "content": [ + { + "type": "text", + "text": "What's the price of a scarf?" } - } - ], - "tool_choice": { + ] + } + ], + tools=[ + { "type": "function", "function": { - "name": "get_current_price" + "name": "get_current_price", + "description": "Get the current price of a item", + "parameters": { + "type": "object", + "properties": { + "item": { + "id": "123" + } + } + } } } + ], + tool_choice={ + "type": "function", + "function": { + "name": "get_current_price" + } }, ) print(resp) diff --git a/docs/examples/46b771a9932c3fa6057a7b2679c72ef0.asciidoc b/docs/examples/46b771a9932c3fa6057a7b2679c72ef0.asciidoc new file mode 100644 index 000000000..f9bceeaba --- /dev/null +++ b/docs/examples/46b771a9932c3fa6057a7b2679c72ef0.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/data-stream-reindex.asciidoc:143 + +[source, python] +---- +resp = client.indices.get_migrate_reindex_status( + index="my-data-stream", +) +print(resp) +---- diff --git a/docs/examples/4982c547be1ad9455ae836990aea92c5.asciidoc b/docs/examples/4982c547be1ad9455ae836990aea92c5.asciidoc index c907beaf6..6cb70a9ca 100644 --- a/docs/examples/4982c547be1ad9455ae836990aea92c5.asciidoc +++ b/docs/examples/4982c547be1ad9455ae836990aea92c5.asciidoc @@ -6,6 +6,11 @@ resp = client.ml.start_trained_model_deployment( model_id="my_model", deployment_id="my_model_for_search", + adaptive_allocations={ + "enabled": True, + "min_number_of_allocations": 3, + "max_number_of_allocations": 10 + }, ) print(resp) ---- diff --git a/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc b/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc index 3a3a91764..b7583a76d 100644 --- a/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc +++ b/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc @@ -1,15 +1,12 @@ // This file is autogenerated, DO NOT EDIT -// inference/stream-inference.asciidoc:88 +// inference/stream-inference.asciidoc:92 [source, python] ---- -resp = client.perform_request( - "POST", - "/_inference/completion/openai-completion/_stream", - headers={"Content-Type": "application/json"}, - body={ - "input": "What is Elastic?" - }, +resp = client.inference.stream_inference( + task_type="completion", + inference_id="openai-completion", + input="What is Elastic?", ) print(resp) ---- diff --git a/docs/examples/4de4bb55bbc0a76c75d256f245a3ee3f.asciidoc b/docs/examples/4de4bb55bbc0a76c75d256f245a3ee3f.asciidoc new file mode 100644 index 000000000..11ed7d7dd --- /dev/null +++ b/docs/examples/4de4bb55bbc0a76c75d256f245a3ee3f.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// inference/elastic-infer-service.asciidoc:100 + +[source, python] +---- +resp = client.inference.put( + task_type="sparse_embedding", + inference_id="elser-model-eis", + inference_config={ + "service": "elastic", + "service_settings": { + "model_name": "elser" + } + }, +) +print(resp) +---- diff --git a/docs/examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc b/docs/examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc index 8e43ea56c..271540047 100644 --- a/docs/examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc +++ b/docs/examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:574 +// search/search-your-data/highlighting.asciidoc:586 [source, python] ---- diff --git a/docs/examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc b/docs/examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc index ed884ed78..9e3334ae1 100644 --- a/docs/examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc +++ b/docs/examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:709 +// search/search-your-data/highlighting.asciidoc:721 [source, python] ---- diff --git a/docs/examples/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc b/docs/examples/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc index d42b38962..238c865bc 100644 --- a/docs/examples/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc +++ b/docs/examples/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:156 +// search/search-your-data/sort-search-results.asciidoc:158 [source, python] ---- diff --git a/docs/examples/537bce129338d9227bccb6a0283dab45.asciidoc b/docs/examples/537bce129338d9227bccb6a0283dab45.asciidoc new file mode 100644 index 000000000..2bae93faa --- /dev/null +++ b/docs/examples/537bce129338d9227bccb6a0283dab45.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/data-stream-reindex.asciidoc:232 + +[source, python] +---- +resp = client.cluster.put_settings( + persistent={ + "migrate.data_stream_reindex_max_request_per_second": 10000 + }, +) +print(resp) +---- diff --git a/docs/examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc b/docs/examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc index 871171fb6..d9f9291ff 100644 --- a/docs/examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc +++ b/docs/examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc @@ -3,15 +3,10 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_security/oidc/prepare", - headers={"Content-Type": "application/json"}, - body={ - "realm": "oidc1", - "state": "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO", - "nonce": "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5" - }, +resp = client.security.oidc_prepare_authentication( + realm="oidc1", + state="lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO", + nonce="zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5", ) print(resp) ---- diff --git a/docs/examples/5969c446688c8b326acc80276573e9d2.asciidoc b/docs/examples/5969c446688c8b326acc80276573e9d2.asciidoc index fd1bb3e8e..b166e37cb 100644 --- a/docs/examples/5969c446688c8b326acc80276573e9d2.asciidoc +++ b/docs/examples/5969c446688c8b326acc80276573e9d2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:312 +// search/search-your-data/highlighting.asciidoc:324 [source, python] ---- diff --git a/docs/examples/59aa5216630f80c5dc298fc5bba4a819.asciidoc b/docs/examples/59aa5216630f80c5dc298fc5bba4a819.asciidoc new file mode 100644 index 000000000..216f6cbbd --- /dev/null +++ b/docs/examples/59aa5216630f80c5dc298fc5bba4a819.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:415 + +[source, python] +---- +resp = client.indices.get_settings( + index=".reindexed-v9-ml-anomalies-custom-example", +) +print(resp) +---- diff --git a/docs/examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc b/docs/examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc index 270362136..57c176743 100644 --- a/docs/examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc +++ b/docs/examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-component-template.asciidoc:261 +// indices/put-component-template.asciidoc:262 [source, python] ---- diff --git a/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc b/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc index 1bf8744d9..c9c33f40d 100644 --- a/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc +++ b/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc @@ -1,19 +1,12 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-across-clusters.asciidoc:296 +// esql/esql-across-clusters.asciidoc:302 [source, python] ---- -resp = client.perform_request( - "POST", - "/_query/async", - params={ - "format": "json" - }, - headers={"Content-Type": "application/json"}, - body={ - "query": "\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ", - "include_ccs_metadata": True - }, +resp = client.esql.async_query( + format="json", + query="\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ", + include_ccs_metadata=True, ) print(resp) ---- diff --git a/docs/examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc b/docs/examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc index a84be9f9e..eab3c0c2e 100644 --- a/docs/examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc +++ b/docs/examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:669 +// search/search-your-data/highlighting.asciidoc:681 [source, python] ---- diff --git a/docs/examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc b/docs/examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc index 7ce071786..895efc693 100644 --- a/docs/examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc +++ b/docs/examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:233 +// search/search-your-data/sort-search-results.asciidoc:235 [source, python] ---- diff --git a/docs/examples/615dc36f0978c676624fb7d1144b4899.asciidoc b/docs/examples/615dc36f0978c676624fb7d1144b4899.asciidoc new file mode 100644 index 000000000..878cf4851 --- /dev/null +++ b/docs/examples/615dc36f0978c676624fb7d1144b4899.asciidoc @@ -0,0 +1,11 @@ +// This file is autogenerated, DO NOT EDIT +// data-streams/lifecycle/apis/get-lifecycle-stats.asciidoc:69 + +[source, python] +---- +resp = client.indices.get_data_lifecycle_stats( + human=True, + pretty=True, +) +print(resp) +---- diff --git a/docs/examples/642161d70dacf7d153767d37d3726838.asciidoc b/docs/examples/642161d70dacf7d153767d37d3726838.asciidoc index a7c877f17..a6acd8d13 100644 --- a/docs/examples/642161d70dacf7d153767d37d3726838.asciidoc +++ b/docs/examples/642161d70dacf7d153767d37d3726838.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/apis/rollup-index-caps.asciidoc:169 +// rollup/apis/rollup-index-caps.asciidoc:171 [source, python] ---- diff --git a/docs/examples/650a0fb27c66a790c4687267423af1da.asciidoc b/docs/examples/650a0fb27c66a790c4687267423af1da.asciidoc index 8bf376bd6..9a7d80337 100644 --- a/docs/examples/650a0fb27c66a790c4687267423af1da.asciidoc +++ b/docs/examples/650a0fb27c66a790c4687267423af1da.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:102 +// alias.asciidoc:104 [source, python] ---- diff --git a/docs/examples/6636701d31b0c9eb8316f1f8e99cc918.asciidoc b/docs/examples/6636701d31b0c9eb8316f1f8e99cc918.asciidoc index afbe3f43f..fffecee75 100644 --- a/docs/examples/6636701d31b0c9eb8316f1f8e99cc918.asciidoc +++ b/docs/examples/6636701d31b0c9eb8316f1f8e99cc918.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// aggregations/metrics/scripted-metric-aggregation.asciidoc:17 +// aggregations/metrics/scripted-metric-aggregation.asciidoc:19 [source, python] ---- diff --git a/docs/examples/666c420fe61fa122386da3c356a64943.asciidoc b/docs/examples/666c420fe61fa122386da3c356a64943.asciidoc index 4ccb7c58f..484d647be 100644 --- a/docs/examples/666c420fe61fa122386da3c356a64943.asciidoc +++ b/docs/examples/666c420fe61fa122386da3c356a64943.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:600 +// search/search-your-data/sort-search-results.asciidoc:602 [source, python] ---- diff --git a/docs/examples/66915e95b723ee2f6e5164a94b8f98c1.asciidoc b/docs/examples/66915e95b723ee2f6e5164a94b8f98c1.asciidoc new file mode 100644 index 000000000..61d7fc158 --- /dev/null +++ b/docs/examples/66915e95b723ee2f6e5164a94b8f98c1.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/create-index-from-source.asciidoc:85 + +[source, python] +---- +resp = client.indices.create_from( + source="my-index", + dest="my-new-index", + create_from=None, +) +print(resp) +---- diff --git a/docs/examples/67b71a95b6fe6c83faae51ea038a1bf1.asciidoc b/docs/examples/67b71a95b6fe6c83faae51ea038a1bf1.asciidoc new file mode 100644 index 000000000..f0c9152d8 --- /dev/null +++ b/docs/examples/67b71a95b6fe6c83faae51ea038a1bf1.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// esql/esql-rest.asciidoc:407 + +[source, python] +---- +resp = client.esql.async_query_delete( + id="FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=", +) +print(resp) +---- diff --git a/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc b/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc index 88e55f89c..bd34b9be6 100644 --- a/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc +++ b/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:703 +// search/retriever.asciidoc:748 [source, python] ---- diff --git a/docs/examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc b/docs/examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc index b164965d1..e6bfa74d3 100644 --- a/docs/examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc +++ b/docs/examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:499 +// search/search-your-data/highlighting.asciidoc:511 [source, python] ---- diff --git a/docs/examples/69d5710bdec73041c66f21d5f96637e8.asciidoc b/docs/examples/69d5710bdec73041c66f21d5f96637e8.asciidoc index ca1d05204..cfe77f4c1 100644 --- a/docs/examples/69d5710bdec73041c66f21d5f96637e8.asciidoc +++ b/docs/examples/69d5710bdec73041c66f21d5f96637e8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:214 +// search/search-your-data/sort-search-results.asciidoc:216 [source, python] ---- diff --git a/docs/examples/d29031409016b2b798148ef173a196ae.asciidoc b/docs/examples/6baf72c04d48cb04c2f8be609ff3b3b5.asciidoc similarity index 73% rename from docs/examples/d29031409016b2b798148ef173a196ae.asciidoc rename to docs/examples/6baf72c04d48cb04c2f8be609ff3b3b5.asciidoc index 9a2275025..cd4a70809 100644 --- a/docs/examples/d29031409016b2b798148ef173a196ae.asciidoc +++ b/docs/examples/6baf72c04d48cb04c2f8be609ff3b3b5.asciidoc @@ -3,17 +3,16 @@ [source, python] ---- -resp = client.indices.create( +resp = client.search( index="test-index", query={ - "semantic": { - "field": "my_semantic_field" + "match": { + "my_semantic_field": "Which country is Paris in?" } }, highlight={ "fields": { "my_semantic_field": { - "type": "semantic", "number_of_fragments": 2, "order": "score" } diff --git a/docs/examples/6ce8334def48552ba7d44025580d9105.asciidoc b/docs/examples/6ce8334def48552ba7d44025580d9105.asciidoc index 68fce2f90..3aca2af6a 100644 --- a/docs/examples/6ce8334def48552ba7d44025580d9105.asciidoc +++ b/docs/examples/6ce8334def48552ba7d44025580d9105.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:240 +// alias.asciidoc:242 [source, python] ---- diff --git a/docs/examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc b/docs/examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc index 3e1bbdaa0..3b72c1464 100644 --- a/docs/examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc +++ b/docs/examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:247 +// esql/esql-rest.asciidoc:248 [source, python] ---- diff --git a/docs/examples/6e498b9dc753b94abf2618c407fa5cd8.asciidoc b/docs/examples/6e498b9dc753b94abf2618c407fa5cd8.asciidoc new file mode 100644 index 000000000..265795311 --- /dev/null +++ b/docs/examples/6e498b9dc753b94abf2618c407fa5cd8.asciidoc @@ -0,0 +1,16 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:453 + +[source, python] +---- +resp = client.reindex( + wait_for_completion=False, + source={ + "index": ".ml-anomalies-custom-example" + }, + dest={ + "index": ".reindexed-v9-ml-anomalies-custom-example" + }, +) +print(resp) +---- diff --git a/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc b/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc index f0612e3b4..14522e393 100644 --- a/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc +++ b/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:340 +// search/retriever.asciidoc:363 [source, python] ---- diff --git a/docs/examples/6ea062455229151e311869a81ee40252.asciidoc b/docs/examples/6ea062455229151e311869a81ee40252.asciidoc index 95f3a9047..7b0addc75 100644 --- a/docs/examples/6ea062455229151e311869a81ee40252.asciidoc +++ b/docs/examples/6ea062455229151e311869a81ee40252.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/search-multiple-indices.asciidoc:49 +// search/search-your-data/search-multiple-indices.asciidoc:83 [source, python] ---- diff --git a/docs/examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc b/docs/examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc index 4ffc08b07..cef497432 100644 --- a/docs/examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc +++ b/docs/examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc @@ -3,16 +3,11 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_security/api_key/_bulk_update", - headers={"Content-Type": "application/json"}, - body={ - "ids": [ - "VuaCfGcBCdbkQm-e5aOx", - "H3_AhoIBA9hmeQJdg7ij" - ] - }, +resp = client.security.bulk_update_api_keys( + ids=[ + "VuaCfGcBCdbkQm-e5aOx", + "H3_AhoIBA9hmeQJdg7ij" + ], ) print(resp) ---- diff --git a/docs/examples/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc b/docs/examples/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc index 41b4fc221..db79aaa94 100644 --- a/docs/examples/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc +++ b/docs/examples/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/apis/rollup-index-caps.asciidoc:94 +// rollup/apis/rollup-index-caps.asciidoc:95 [source, python] ---- diff --git a/docs/examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc b/docs/examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc index 73bd36aa9..952a42b78 100644 --- a/docs/examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc +++ b/docs/examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:97 +// esql/multivalued-fields.asciidoc:99 [source, python] ---- diff --git a/docs/examples/75e360d03fb416f0a65ca37c662c2e9c.asciidoc b/docs/examples/75e360d03fb416f0a65ca37c662c2e9c.asciidoc index 4cccf15fc..2e00f18c9 100644 --- a/docs/examples/75e360d03fb416f0a65ca37c662c2e9c.asciidoc +++ b/docs/examples/75e360d03fb416f0a65ca37c662c2e9c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// aggregations/metrics/scripted-metric-aggregation.asciidoc:157 +// aggregations/metrics/scripted-metric-aggregation.asciidoc:159 [source, python] ---- diff --git a/docs/examples/75e6d66e94e61bd8a555beaaee255c36.asciidoc b/docs/examples/75e6d66e94e61bd8a555beaaee255c36.asciidoc index f1e5b8201..bfb1cadf1 100644 --- a/docs/examples/75e6d66e94e61bd8a555beaaee255c36.asciidoc +++ b/docs/examples/75e6d66e94e61bd8a555beaaee255c36.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/apis/rollup-search.asciidoc:176 +// rollup/apis/rollup-search.asciidoc:178 [source, python] ---- diff --git a/docs/examples/76e02434835630cb830724beb92df354.asciidoc b/docs/examples/76e02434835630cb830724beb92df354.asciidoc index 886da7d4d..cc7602fe4 100644 --- a/docs/examples/76e02434835630cb830724beb92df354.asciidoc +++ b/docs/examples/76e02434835630cb830724beb92df354.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:1183 +// search/search-your-data/retrievers-examples.asciidoc:1433 [source, python] ---- diff --git a/docs/examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc b/docs/examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc index f62ff2428..f68073684 100644 --- a/docs/examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc +++ b/docs/examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc @@ -3,36 +3,31 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_text_structure/find_message_structure", - headers={"Content-Type": "application/json"}, - body={ - "messages": [ - "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128", - "[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]", - "[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]", - "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]", - "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]", - "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]", - "[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]", - "[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled", - "[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled", - "[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled", - "[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]", - "[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]", - "[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized", - "[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ..." - ] - }, +resp = client.text_structure.find_message_structure( + messages=[ + "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128", + "[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]", + "[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]", + "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]", + "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]", + "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]", + "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]", + "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]", + "[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]", + "[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled", + "[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled", + "[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled", + "[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]", + "[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]", + "[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized", + "[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ..." + ], ) print(resp) ---- diff --git a/docs/examples/78043831fd32004a82930c8ac8a1d809.asciidoc b/docs/examples/78043831fd32004a82930c8ac8a1d809.asciidoc index f2b32c69a..5a0d6d76f 100644 --- a/docs/examples/78043831fd32004a82930c8ac8a1d809.asciidoc +++ b/docs/examples/78043831fd32004a82930c8ac8a1d809.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:1128 +// search/search-your-data/retrievers-examples.asciidoc:1378 [source, python] ---- diff --git a/docs/examples/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc b/docs/examples/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc index b14f14162..ff8f36636 100644 --- a/docs/examples/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc +++ b/docs/examples/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:135 +// alias.asciidoc:137 [source, python] ---- diff --git a/docs/examples/79d206a528be704050a437adce2496dd.asciidoc b/docs/examples/79d206a528be704050a437adce2496dd.asciidoc index 25b3aae32..0a1f7c9ca 100644 --- a/docs/examples/79d206a528be704050a437adce2496dd.asciidoc +++ b/docs/examples/79d206a528be704050a437adce2496dd.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:584 +// search/retriever.asciidoc:629 [source, python] ---- diff --git a/docs/examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc b/docs/examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc index 62de86215..2127f437f 100644 --- a/docs/examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc +++ b/docs/examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// docs/update.asciidoc:368 +// docs/update.asciidoc:364 [source, python] ---- diff --git a/docs/examples/7ba29f0be2297b54a640b0a17d7ef5ca.asciidoc b/docs/examples/7ba29f0be2297b54a640b0a17d7ef5ca.asciidoc index 1ed294e9c..aff1144dd 100644 --- a/docs/examples/7ba29f0be2297b54a640b0a17d7ef5ca.asciidoc +++ b/docs/examples/7ba29f0be2297b54a640b0a17d7ef5ca.asciidoc @@ -3,9 +3,8 @@ [source, python] ---- -resp = client.perform_request( - "DELETE", - "/_ingest/ip_location/database/my-database-id", +resp = client.ingest.delete_ip_location_database( + id="my-database-id", ) print(resp) ---- diff --git a/docs/examples/7bdc283b96c7a965fae23013647b8578.asciidoc b/docs/examples/7bdc283b96c7a965fae23013647b8578.asciidoc index b71f4fa2e..2bc21bbf0 100644 --- a/docs/examples/7bdc283b96c7a965fae23013647b8578.asciidoc +++ b/docs/examples/7bdc283b96c7a965fae23013647b8578.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/semantic-text.asciidoc:194 +// mapping/types/semantic-text.asciidoc:220 [source, python] ---- diff --git a/docs/examples/7daff6b7e668ab8a762b8ab5dff7a167.asciidoc b/docs/examples/7daff6b7e668ab8a762b8ab5dff7a167.asciidoc index 9b796b318..75048641a 100644 --- a/docs/examples/7daff6b7e668ab8a762b8ab5dff7a167.asciidoc +++ b/docs/examples/7daff6b7e668ab8a762b8ab5dff7a167.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/sparse-vector-query.asciidoc:257 +// query-dsl/sparse-vector-query.asciidoc:260 [source, python] ---- diff --git a/docs/examples/7f2d511cb64743c006225e5933a14bb4.asciidoc b/docs/examples/7f2d511cb64743c006225e5933a14bb4.asciidoc index 4412a2a08..60a3269ff 100644 --- a/docs/examples/7f2d511cb64743c006225e5933a14bb4.asciidoc +++ b/docs/examples/7f2d511cb64743c006225e5933a14bb4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-across-clusters.asciidoc:67 +// esql/esql-across-clusters.asciidoc:69 [source, python] ---- diff --git a/docs/examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc b/docs/examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc index 0c25a55f4..649738ffe 100644 --- a/docs/examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc +++ b/docs/examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:288 +// esql/esql-rest.asciidoc:289 [source, python] ---- diff --git a/docs/examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc b/docs/examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc index 702838d56..6a24cfa16 100644 --- a/docs/examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc +++ b/docs/examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc @@ -3,40 +3,35 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_security/api_key/_bulk_update", - headers={"Content-Type": "application/json"}, - body={ - "ids": [ - "VuaCfGcBCdbkQm-e5aOx", - "H3_AhoIBA9hmeQJdg7ij" - ], - "role_descriptors": { - "role-a": { - "indices": [ - { - "names": [ - "*" - ], - "privileges": [ - "write" - ] - } - ] - } - }, - "metadata": { - "environment": { - "level": 2, - "trusted": True, - "tags": [ - "production" - ] - } - }, - "expiration": "30d" +resp = client.security.bulk_update_api_keys( + ids=[ + "VuaCfGcBCdbkQm-e5aOx", + "H3_AhoIBA9hmeQJdg7ij" + ], + role_descriptors={ + "role-a": { + "indices": [ + { + "names": [ + "*" + ], + "privileges": [ + "write" + ] + } + ] + } }, + metadata={ + "environment": { + "level": 2, + "trusted": True, + "tags": [ + "production" + ] + } + }, + expiration="30d", ) print(resp) ---- diff --git a/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc b/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc index 5e62a1545..b0c0af2a7 100644 --- a/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc +++ b/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:792 +// search/retriever.asciidoc:837 [source, python] ---- diff --git a/docs/examples/82bb6c61dab959f4446dc5ecab7ecbdf.asciidoc b/docs/examples/82bb6c61dab959f4446dc5ecab7ecbdf.asciidoc index f5e9f0231..8bbb6682c 100644 --- a/docs/examples/82bb6c61dab959f4446dc5ecab7ecbdf.asciidoc +++ b/docs/examples/82bb6c61dab959f4446dc5ecab7ecbdf.asciidoc @@ -1,35 +1,32 @@ // This file is autogenerated, DO NOT EDIT -// inference/chat-completion-inference.asciidoc:318 +// inference/chat-completion-inference.asciidoc:322 [source, python] ---- -resp = client.perform_request( - "POST", - "/_inference/chat_completion/openai-completion/_stream", - headers={"Content-Type": "application/json"}, - body={ - "messages": [ - { - "role": "assistant", - "content": "Let's find out what the weather is", - "tool_calls": [ - { - "id": "call_KcAjWtAww20AihPHphUh46Gd", - "type": "function", - "function": { - "name": "get_current_weather", - "arguments": "{\"location\":\"Boston, MA\"}" - } +resp = client.inference.stream_inference( + task_type="chat_completion", + inference_id="openai-completion", + messages=[ + { + "role": "assistant", + "content": "Let's find out what the weather is", + "tool_calls": [ + { + "id": "call_KcAjWtAww20AihPHphUh46Gd", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\":\"Boston, MA\"}" } - ] - }, - { - "role": "tool", - "content": "The weather is cold", - "tool_call_id": "call_KcAjWtAww20AihPHphUh46Gd" - } - ] - }, + } + ] + }, + { + "role": "tool", + "content": "The weather is cold", + "tool_call_id": "call_KcAjWtAww20AihPHphUh46Gd" + } + ], ) print(resp) ---- diff --git a/docs/examples/84465de841fe5c6099a0382f786f2cb8.asciidoc b/docs/examples/84465de841fe5c6099a0382f786f2cb8.asciidoc index e94fea979..733c7f6c0 100644 --- a/docs/examples/84465de841fe5c6099a0382f786f2cb8.asciidoc +++ b/docs/examples/84465de841fe5c6099a0382f786f2cb8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:74 +// alias.asciidoc:76 [source, python] ---- diff --git a/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc b/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc index e41858318..12888ed06 100644 --- a/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc +++ b/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:831 +// search/retriever.asciidoc:876 [source, python] ---- diff --git a/docs/examples/8621c05cc7cf3880bde751f6670a0c3a.asciidoc b/docs/examples/8621c05cc7cf3880bde751f6670a0c3a.asciidoc new file mode 100644 index 000000000..d4812b0ab --- /dev/null +++ b/docs/examples/8621c05cc7cf3880bde751f6670a0c3a.asciidoc @@ -0,0 +1,15 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:439 + +[source, python] +---- +resp = client.indices.put_settings( + index=".reindexed-v9-ml-anomalies-custom-example", + settings={ + "index": { + "number_of_replicas": 0 + } + }, +) +print(resp) +---- diff --git a/docs/examples/87457bb3467484bec3e9df4e25942ba6.asciidoc b/docs/examples/87457bb3467484bec3e9df4e25942ba6.asciidoc index 484399a22..02f191745 100644 --- a/docs/examples/87457bb3467484bec3e9df4e25942ba6.asciidoc +++ b/docs/examples/87457bb3467484bec3e9df4e25942ba6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:269 +// esql/multivalued-fields.asciidoc:275 [source, python] ---- diff --git a/docs/examples/88b19973b970adf9b73fca82017d4951.asciidoc b/docs/examples/88b19973b970adf9b73fca82017d4951.asciidoc index bb844e3be..9c389814b 100644 --- a/docs/examples/88b19973b970adf9b73fca82017d4951.asciidoc +++ b/docs/examples/88b19973b970adf9b73fca82017d4951.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/search-multiple-indices.asciidoc:30 +// search/search-your-data/search-multiple-indices.asciidoc:36 [source, python] ---- diff --git a/docs/examples/89f547649895176c246bb8c41313ff21.asciidoc b/docs/examples/89f547649895176c246bb8c41313ff21.asciidoc new file mode 100644 index 000000000..58b50c14d --- /dev/null +++ b/docs/examples/89f547649895176c246bb8c41313ff21.asciidoc @@ -0,0 +1,15 @@ +// This file is autogenerated, DO NOT EDIT +// esql/esql-syntax.asciidoc:202 + +[source, python] +---- +resp = client.esql.query( + query="\nFROM library\n| EVAL year = DATE_EXTRACT(\"year\", release_date)\n| WHERE page_count > ? AND match(author, ?, {\"minimum_should_match\": ?})\n| LIMIT 5\n", + params=[ + 300, + "Frank Herbert", + 2 + ], +) +print(resp) +---- diff --git a/docs/examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc b/docs/examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc index 8a6c13fbf..c46aba59b 100644 --- a/docs/examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc +++ b/docs/examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-elser.asciidoc:157 +// migration/migrate_9_0.asciidoc:467 [source, python] ---- diff --git a/docs/examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc b/docs/examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc deleted file mode 100644 index 8573b7472..000000000 --- a/docs/examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// rest-api/security/query-role.asciidoc:133 - -[source, python] ----- -resp = client.security.query_role( - sort=[ - "name" - ], -) -print(resp) ----- diff --git a/docs/examples/8c47c80139f40f25db44f5781ca2dfbe.asciidoc b/docs/examples/8c47c80139f40f25db44f5781ca2dfbe.asciidoc new file mode 100644 index 000000000..8503017e7 --- /dev/null +++ b/docs/examples/8c47c80139f40f25db44f5781ca2dfbe.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:491 + +[source, python] +---- +resp = client.indices.get_alias( + index=".ml-anomalies-custom-example", +) +print(resp) +---- diff --git a/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc b/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc index 6e0eedc2a..850788ba4 100644 --- a/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc +++ b/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:291 +// search/retriever.asciidoc:314 [source, python] ---- diff --git a/docs/examples/91e106a2affbc8df32cd940684a779ed.asciidoc b/docs/examples/91e106a2affbc8df32cd940684a779ed.asciidoc index acc46409b..fa050f564 100644 --- a/docs/examples/91e106a2affbc8df32cd940684a779ed.asciidoc +++ b/docs/examples/91e106a2affbc8df32cd940684a779ed.asciidoc @@ -3,11 +3,9 @@ [source, python] ---- -resp = client.perform_request( - "PUT", - "/_ingest/ip_location/database/my-database-1", - headers={"Content-Type": "application/json"}, - body={ +resp = client.ingest.put_ip_location_database( + id="my-database-1", + configuration={ "name": "GeoIP2-Domain", "maxmind": { "account_id": "1234567" diff --git a/docs/examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc b/docs/examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc index 5983ceb0a..5ba6e11be 100644 --- a/docs/examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc +++ b/docs/examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:267 +// esql/esql-rest.asciidoc:268 [source, python] ---- diff --git a/docs/examples/944806221eb89f5af2298ccdf2902277.asciidoc b/docs/examples/944806221eb89f5af2298ccdf2902277.asciidoc index be677f846..896a4c10f 100644 --- a/docs/examples/944806221eb89f5af2298ccdf2902277.asciidoc +++ b/docs/examples/944806221eb89f5af2298ccdf2902277.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/apis/rollup-caps.asciidoc:169 +// rollup/apis/rollup-caps.asciidoc:171 [source, python] ---- diff --git a/docs/examples/947efe87db7f8813c0878f8affc3e2d1.asciidoc b/docs/examples/947efe87db7f8813c0878f8affc3e2d1.asciidoc new file mode 100644 index 000000000..43dfda185 --- /dev/null +++ b/docs/examples/947efe87db7f8813c0878f8affc3e2d1.asciidoc @@ -0,0 +1,8 @@ +// This file is autogenerated, DO NOT EDIT +// indices/resolve-cluster.asciidoc:83 + +[source, python] +---- +resp = client.indices.resolve_cluster() +print(resp) +---- diff --git a/docs/examples/948418e0ef1b7e7cfee2f11be715d7d2.asciidoc b/docs/examples/948418e0ef1b7e7cfee2f11be715d7d2.asciidoc index 3abdfaedb..700fe6f3a 100644 --- a/docs/examples/948418e0ef1b7e7cfee2f11be715d7d2.asciidoc +++ b/docs/examples/948418e0ef1b7e7cfee2f11be715d7d2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:465 +// search/search-your-data/retrievers-examples.asciidoc:715 [source, python] ---- diff --git a/docs/examples/95c1b376652533c352bbf793c74d1b08.asciidoc b/docs/examples/95c1b376652533c352bbf793c74d1b08.asciidoc index a0778d4b3..273d0eb91 100644 --- a/docs/examples/95c1b376652533c352bbf793c74d1b08.asciidoc +++ b/docs/examples/95c1b376652533c352bbf793c74d1b08.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/query-role.asciidoc:233 +// rest-api/security/query-role.asciidoc:247 [source, python] ---- diff --git a/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc b/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc index 502b26032..a7eb8de57 100644 --- a/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc +++ b/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:719 +// search/retriever.asciidoc:764 [source, python] ---- diff --git a/docs/examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc b/docs/examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc index d6d19299d..35f2440da 100644 --- a/docs/examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc +++ b/docs/examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:105 +// search/search-your-data/retrievers-examples.asciidoc:113 [source, python] ---- diff --git a/docs/examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc b/docs/examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc index 4129bbe4c..04eac66eb 100644 --- a/docs/examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc +++ b/docs/examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:616 +// search/search-your-data/highlighting.asciidoc:628 [source, python] ---- diff --git a/docs/examples/99fb82d49ac477e6a9dfdd71f9465374.asciidoc b/docs/examples/99fb82d49ac477e6a9dfdd71f9465374.asciidoc index df9b99ed6..97135e772 100644 --- a/docs/examples/99fb82d49ac477e6a9dfdd71f9465374.asciidoc +++ b/docs/examples/99fb82d49ac477e6a9dfdd71f9465374.asciidoc @@ -3,9 +3,8 @@ [source, python] ---- -resp = client.perform_request( - "DELETE", - "/_ingest/ip_location/database/example-database-id", +resp = client.ingest.delete_ip_location_database( + id="example-database-id", ) print(resp) ---- diff --git a/docs/examples/9afa0844883b7471883aa378a8dd10b4.asciidoc b/docs/examples/9afa0844883b7471883aa378a8dd10b4.asciidoc index b8c42b55b..331a8522d 100644 --- a/docs/examples/9afa0844883b7471883aa378a8dd10b4.asciidoc +++ b/docs/examples/9afa0844883b7471883aa378a8dd10b4.asciidoc @@ -3,11 +3,10 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_application/analytics/my_analytics_collection/event/search_click", - headers={"Content-Type": "application/json"}, - body={ +resp = client.search_application.post_behavioral_analytics_event( + collection_name="my_analytics_collection", + event_type="search_click", + payload={ "session": { "id": "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9" }, diff --git a/docs/examples/9beb260834f8cfb240f6308950dbb9c2.asciidoc b/docs/examples/9beb260834f8cfb240f6308950dbb9c2.asciidoc index 4e029bc94..aaa229972 100644 --- a/docs/examples/9beb260834f8cfb240f6308950dbb9c2.asciidoc +++ b/docs/examples/9beb260834f8cfb240f6308950dbb9c2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:521 +// search/search-your-data/sort-search-results.asciidoc:523 [source, python] ---- diff --git a/docs/examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc b/docs/examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc index 227cb5a9e..425a0e6c8 100644 --- a/docs/examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc +++ b/docs/examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc @@ -3,16 +3,11 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_security/oidc/authenticate", - headers={"Content-Type": "application/json"}, - body={ - "redirect_uri": "https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - "state": "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", - "nonce": "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM", - "realm": "oidc1" - }, +resp = client.security.oidc_authenticate( + redirect_uri="https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", + state="4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", + nonce="WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM", + realm="oidc1", ) print(resp) ---- diff --git a/docs/examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc b/docs/examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc index f0d7cb7d0..435e9f608 100644 --- a/docs/examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc +++ b/docs/examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:308 +// esql/esql-rest.asciidoc:309 [source, python] ---- diff --git a/docs/examples/a00311843b5f8f3e9f7d511334a828b1.asciidoc b/docs/examples/a00311843b5f8f3e9f7d511334a828b1.asciidoc index 5802d6251..9d5f860ed 100644 --- a/docs/examples/a00311843b5f8f3e9f7d511334a828b1.asciidoc +++ b/docs/examples/a00311843b5f8f3e9f7d511334a828b1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/apis/rollup-caps.asciidoc:97 +// rollup/apis/rollup-caps.asciidoc:98 [source, python] ---- diff --git a/docs/examples/a162eb50853331c80596f5994e9d1c38.asciidoc b/docs/examples/a162eb50853331c80596f5994e9d1c38.asciidoc index f8772be64..407bfdda7 100644 --- a/docs/examples/a162eb50853331c80596f5994e9d1c38.asciidoc +++ b/docs/examples/a162eb50853331c80596f5994e9d1c38.asciidoc @@ -3,14 +3,10 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_application/search_application/my_search_application/_render_query", - headers={"Content-Type": "application/json"}, - body={ - "params": { - "query_string": "rock climbing" - } +resp = client.search_application.render_query( + name="my_search_application", + params={ + "query_string": "rock climbing" }, ) print(resp) diff --git a/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc b/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc index 743681aa0..304ea62c6 100644 --- a/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc +++ b/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:639 +// search/retriever.asciidoc:684 [source, python] ---- diff --git a/docs/examples/a34e758e019f563d323ca90ad9fd6e3e.asciidoc b/docs/examples/a34e758e019f563d323ca90ad9fd6e3e.asciidoc index 366706ece..7571d51c7 100644 --- a/docs/examples/a34e758e019f563d323ca90ad9fd6e3e.asciidoc +++ b/docs/examples/a34e758e019f563d323ca90ad9fd6e3e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:266 +// alias.asciidoc:268 [source, python] ---- diff --git a/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc b/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc index 7d18ab764..a1a4feb8b 100644 --- a/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc +++ b/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:154 +// search/retriever.asciidoc:159 [source, python] ---- diff --git a/docs/examples/a46f566ca031375658c22f89b87dc6d2.asciidoc b/docs/examples/a46f566ca031375658c22f89b87dc6d2.asciidoc new file mode 100644 index 000000000..b046f9db2 --- /dev/null +++ b/docs/examples/a46f566ca031375658c22f89b87dc6d2.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:379 + +[source, python] +---- +resp = client.cat.indices( + index=".ml-anomalies-custom-example", + v=True, + h="index,store.size", +) +print(resp) +---- diff --git a/docs/examples/a60aaed30d7d26eaacbb2c0ed4ddc66d.asciidoc b/docs/examples/a60aaed30d7d26eaacbb2c0ed4ddc66d.asciidoc new file mode 100644 index 000000000..9c66465db --- /dev/null +++ b/docs/examples/a60aaed30d7d26eaacbb2c0ed4ddc66d.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/data-stream-reindex-cancel.asciidoc:41 + +[source, python] +---- +resp = client.indices.cancel_migrate_reindex( + index="my-data-stream", +) +print(resp) +---- diff --git a/docs/examples/a675fafa7c688cb3ea1be09bf887ebf0.asciidoc b/docs/examples/a675fafa7c688cb3ea1be09bf887ebf0.asciidoc new file mode 100644 index 000000000..ec9d585b8 --- /dev/null +++ b/docs/examples/a675fafa7c688cb3ea1be09bf887ebf0.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/data-stream-reindex.asciidoc:310 + +[source, python] +---- +resp = client.indices.get( + index=".migrated-ds-my-data-stream-2025.01.23-000001", + human=True, + filter_path="*.settings.index.version.created_string", +) +print(resp) +---- diff --git a/docs/examples/a9554396506888e392a1aee0ca28e6fc.asciidoc b/docs/examples/a9554396506888e392a1aee0ca28e6fc.asciidoc index 4b8648d66..6b99effea 100644 --- a/docs/examples/a9554396506888e392a1aee0ca28e6fc.asciidoc +++ b/docs/examples/a9554396506888e392a1aee0ca28e6fc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:327 +// alias.asciidoc:329 [source, python] ---- diff --git a/docs/examples/a95a123b9f862e52ab1e8f875961c852.asciidoc b/docs/examples/a95a123b9f862e52ab1e8f875961c852.asciidoc index 37a2b6565..e0f8c052a 100644 --- a/docs/examples/a95a123b9f862e52ab1e8f875961c852.asciidoc +++ b/docs/examples/a95a123b9f862e52ab1e8f875961c852.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/search-multiple-indices.asciidoc:90 +// search/search-your-data/search-multiple-indices.asciidoc:124 [source, python] ---- diff --git a/docs/examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc b/docs/examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc index e3f0a60c7..79fb403e2 100644 --- a/docs/examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc +++ b/docs/examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:605 +// search/retriever.asciidoc:650 [source, python] ---- diff --git a/docs/examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc b/docs/examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc index 2023f2b91..b722f9c00 100644 --- a/docs/examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc +++ b/docs/examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:1235 +// search/search-your-data/retrievers-examples.asciidoc:1485 [source, python] ---- diff --git a/docs/examples/acb10091ad335ddd15d71021aaf23c62.asciidoc b/docs/examples/acb10091ad335ddd15d71021aaf23c62.asciidoc index 376de04ba..ba72e08ea 100644 --- a/docs/examples/acb10091ad335ddd15d71021aaf23c62.asciidoc +++ b/docs/examples/acb10091ad335ddd15d71021aaf23c62.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:629 +// search/search-your-data/sort-search-results.asciidoc:631 [source, python] ---- diff --git a/docs/examples/adced6e22ef03c2ae3b14aa5bdd24fd9.asciidoc b/docs/examples/adced6e22ef03c2ae3b14aa5bdd24fd9.asciidoc new file mode 100644 index 000000000..d3a25bc3d --- /dev/null +++ b/docs/examples/adced6e22ef03c2ae3b14aa5bdd24fd9.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/data-stream-reindex-status.asciidoc:130 + +[source, python] +---- +resp = client.indices.get_migrate_reindex_status( + index="my-data-stream", +) +print(resp) +---- diff --git a/docs/examples/aee4734ee63dbbbd12a21ee886f7a829.asciidoc b/docs/examples/aee4734ee63dbbbd12a21ee886f7a829.asciidoc index cb793773a..e9097b421 100644 --- a/docs/examples/aee4734ee63dbbbd12a21ee886f7a829.asciidoc +++ b/docs/examples/aee4734ee63dbbbd12a21ee886f7a829.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:546 +// search/search-your-data/sort-search-results.asciidoc:548 [source, python] ---- diff --git a/docs/examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc b/docs/examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc index 671165a4a..d3c2b9d84 100644 --- a/docs/examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc +++ b/docs/examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc @@ -3,9 +3,8 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_application/search_application/my_search_application/_render_query", +resp = client.search_application.render_query( + name="my_search_application", ) print(resp) ---- diff --git a/docs/examples/b1e81b70b874a1f0cf75a0ec6e430ddc.asciidoc b/docs/examples/b1e81b70b874a1f0cf75a0ec6e430ddc.asciidoc new file mode 100644 index 000000000..bec033a8c --- /dev/null +++ b/docs/examples/b1e81b70b874a1f0cf75a0ec6e430ddc.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// esql/esql-async-query-stop-api.asciidoc:25 + +[source, python] +---- +resp = client.esql.async_query_stop( + id="FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=", +) +print(resp) +---- diff --git a/docs/examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc b/docs/examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc index 61fa4718a..797108412 100644 --- a/docs/examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc +++ b/docs/examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-component-template.asciidoc:195 +// indices/put-component-template.asciidoc:196 [source, python] ---- diff --git a/docs/examples/b5bc1bb7278f2f95bc54790c78c928e0.asciidoc b/docs/examples/b5bc1bb7278f2f95bc54790c78c928e0.asciidoc index 30ad58e2e..0e8d41aca 100644 --- a/docs/examples/b5bc1bb7278f2f95bc54790c78c928e0.asciidoc +++ b/docs/examples/b5bc1bb7278f2f95bc54790c78c928e0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/apis/get-job.asciidoc:169 +// rollup/apis/get-job.asciidoc:170 [source, python] ---- diff --git a/docs/examples/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc b/docs/examples/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc index c1251db36..799a9e6fc 100644 --- a/docs/examples/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc +++ b/docs/examples/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:370 +// search/search-your-data/sort-search-results.asciidoc:372 [source, python] ---- diff --git a/docs/examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc b/docs/examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc index 756defefe..5e79af3af 100644 --- a/docs/examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc +++ b/docs/examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc @@ -186,13 +186,9 @@ resp = client.bulk( ) print(resp) -resp1 = client.perform_request( - "GET", - "/_text_structure/find_field_structure", - params={ - "index": "test-logs", - "field": "message" - }, +resp1 = client.text_structure.find_field_structure( + index="test-logs", + field="message", ) print(resp1) ---- diff --git a/docs/examples/357edc9d10e98ed776401c7a439a1a55.asciidoc b/docs/examples/ba0e7e0b18fc9ec6c623d40186d1f61b.asciidoc similarity index 78% rename from docs/examples/357edc9d10e98ed776401c7a439a1a55.asciidoc rename to docs/examples/ba0e7e0b18fc9ec6c623d40186d1f61b.asciidoc index 90b277dc4..c25ea798e 100644 --- a/docs/examples/357edc9d10e98ed776401c7a439a1a55.asciidoc +++ b/docs/examples/ba0e7e0b18fc9ec6c623d40186d1f61b.asciidoc @@ -1,11 +1,12 @@ // This file is autogenerated, DO NOT EDIT -// indices/resolve-cluster.asciidoc:244 +// indices/resolve-cluster.asciidoc:271 [source, python] ---- resp = client.indices.resolve_cluster( name="not-present,clust*:my-index*,oldcluster:*", ignore_unavailable=False, + timeout="5s", ) print(resp) ---- diff --git a/docs/examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc b/docs/examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc index 42efc866a..f1cecf299 100644 --- a/docs/examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc +++ b/docs/examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:354 +// search/search-your-data/retrievers-examples.asciidoc:604 [source, python] ---- diff --git a/docs/examples/436d50b85fc8f0977d02059eec00719b.asciidoc b/docs/examples/bcd1afb793240b1dddd9fa5d3f21192b.asciidoc similarity index 52% rename from docs/examples/436d50b85fc8f0977d02059eec00719b.asciidoc rename to docs/examples/bcd1afb793240b1dddd9fa5d3f21192b.asciidoc index bd4578790..bc2e08cf0 100644 --- a/docs/examples/436d50b85fc8f0977d02059eec00719b.asciidoc +++ b/docs/examples/bcd1afb793240b1dddd9fa5d3f21192b.asciidoc @@ -6,15 +6,11 @@ resp = client.update( index="test", id="1", - script={ - "source": "ctx._source.counter += params.count", - "lang": "painless", - "params": { - "count": 4 - } + doc={ + "product_price": 100 }, upsert={ - "counter": 1 + "product_price": 50 }, ) print(resp) diff --git a/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc b/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc index f3b87e892..05c952c57 100644 --- a/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc +++ b/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc @@ -3,38 +3,33 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_ingest/_simulate", - headers={"Content-Type": "application/json"}, - body={ - "docs": [ - { - "_index": "my-index", - "_id": "123", - "_source": { - "foo": "bar" - } - }, - { - "_index": "my-index", - "_id": "456", - "_source": { - "foo": "rab" - } +resp = client.simulate.ingest( + docs=[ + { + "_index": "my-index", + "_id": "123", + "_source": { + "foo": "bar" } - ], - "pipeline_substitutions": { - "my-pipeline": { - "processors": [ - { - "uppercase": { - "field": "foo" - } - } - ] + }, + { + "_index": "my-index", + "_id": "456", + "_source": { + "foo": "rab" } } + ], + pipeline_substitutions={ + "my-pipeline": { + "processors": [ + { + "uppercase": { + "field": "foo" + } + } + ] + } }, ) print(resp) diff --git a/docs/examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc b/docs/examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc index 416fc9bf1..2c5b4ba3a 100644 --- a/docs/examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc +++ b/docs/examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// docs/update.asciidoc:339 +// docs/update.asciidoc:335 [source, python] ---- diff --git a/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc b/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc index 23c293ac8..7e2332729 100644 --- a/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc +++ b/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-across-clusters.asciidoc:117 +// esql/esql-across-clusters.asciidoc:119 [source, python] ---- diff --git a/docs/examples/bf3f520b47581d861e802730aaf2a519.asciidoc b/docs/examples/bf3f520b47581d861e802730aaf2a519.asciidoc index dfc5bc6f9..87ce2230e 100644 --- a/docs/examples/bf3f520b47581d861e802730aaf2a519.asciidoc +++ b/docs/examples/bf3f520b47581d861e802730aaf2a519.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:33 +// alias.asciidoc:35 [source, python] ---- diff --git a/docs/examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc b/docs/examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc index 0c6394b4a..e2f4cc12b 100644 --- a/docs/examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc +++ b/docs/examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:410 +// search/search-your-data/highlighting.asciidoc:422 [source, python] ---- diff --git a/docs/examples/c3b77e11b16e37e9e37e28dec922432e.asciidoc b/docs/examples/c3b77e11b16e37e9e37e28dec922432e.asciidoc new file mode 100644 index 000000000..09b688408 --- /dev/null +++ b/docs/examples/c3b77e11b16e37e9e37e28dec922432e.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// esql/esql-syntax.asciidoc:187 + +[source, python] +---- +resp = client.esql.query( + query="\nFROM library\n| WHERE match(author, \"Frank Herbert\", {\"minimum_should_match\": 2, \"operator\": \"AND\"})\n| LIMIT 5\n", +) +print(resp) +---- diff --git a/docs/examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc b/docs/examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc index 3bec7673e..fd2d55854 100644 --- a/docs/examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc +++ b/docs/examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:225 +// esql/esql-rest.asciidoc:226 [source, python] ---- diff --git a/docs/examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc b/docs/examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc index 20dca25b2..267309f1b 100644 --- a/docs/examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc +++ b/docs/examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc @@ -3,17 +3,12 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_security/api_key/_bulk_update", - headers={"Content-Type": "application/json"}, - body={ - "ids": [ - "VuaCfGcBCdbkQm-e5aOx", - "H3_AhoIBA9hmeQJdg7ij" - ], - "role_descriptors": {} - }, +resp = client.security.bulk_update_api_keys( + ids=[ + "VuaCfGcBCdbkQm-e5aOx", + "H3_AhoIBA9hmeQJdg7ij" + ], + role_descriptors={}, ) print(resp) ---- diff --git a/docs/examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc b/docs/examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc index 448adcb42..514f0f8aa 100644 --- a/docs/examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc +++ b/docs/examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-component-template.asciidoc:235 +// indices/put-component-template.asciidoc:236 [source, python] ---- diff --git a/docs/examples/ca5dda98e977125d40a7fe1e178e213f.asciidoc b/docs/examples/ca5dda98e977125d40a7fe1e178e213f.asciidoc index 1ae157bfb..a6c8c5cb1 100644 --- a/docs/examples/ca5dda98e977125d40a7fe1e178e213f.asciidoc +++ b/docs/examples/ca5dda98e977125d40a7fe1e178e213f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/sparse-vector-query.asciidoc:131 +// query-dsl/sparse-vector-query.asciidoc:134 [source, python] ---- diff --git a/docs/examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc b/docs/examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc index c403a96b0..b994f1ee9 100644 --- a/docs/examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc +++ b/docs/examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:53 +// esql/multivalued-fields.asciidoc:54 [source, python] ---- diff --git a/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc b/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc index 38ea94f46..8de3e1f3e 100644 --- a/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc +++ b/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc @@ -3,75 +3,70 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_ingest/_simulate", - headers={"Content-Type": "application/json"}, - body={ - "docs": [ - { - "_index": "my-index", - "_id": "id", - "_source": { - "foo": "bar" - } - }, - { - "_index": "my-index", - "_id": "id", - "_source": { - "foo": "rab" - } - } - ], - "pipeline_substitutions": { - "my-pipeline": { - "processors": [ - { - "set": { - "field": "field3", - "value": "value3" - } - } - ] +resp = client.simulate.ingest( + docs=[ + { + "_index": "my-index", + "_id": "id", + "_source": { + "foo": "bar" } }, - "component_template_substitutions": { - "my-component-template": { - "template": { - "mappings": { - "dynamic": "true", - "properties": { - "field3": { - "type": "keyword" - } - } - }, - "settings": { - "index": { - "default_pipeline": "my-pipeline" + { + "_index": "my-index", + "_id": "id", + "_source": { + "foo": "rab" + } + } + ], + pipeline_substitutions={ + "my-pipeline": { + "processors": [ + { + "set": { + "field": "field3", + "value": "value3" + } + } + ] + } + }, + component_template_substitutions={ + "my-component-template": { + "template": { + "mappings": { + "dynamic": "true", + "properties": { + "field3": { + "type": "keyword" } } + }, + "settings": { + "index": { + "default_pipeline": "my-pipeline" + } } } - }, - "index_template_substitutions": { - "my-index-template": { - "index_patterns": [ - "my-index-*" - ], - "composed_of": [ - "component_template_1", - "component_template_2" - ] - } - }, - "mapping_addition": { - "dynamic": "strict", - "properties": { - "foo": { - "type": "keyword" - } + } + }, + index_template_substitutions={ + "my-index-template": { + "index_patterns": [ + "my-index-*" + ], + "composed_of": [ + "component_template_1", + "component_template_2" + ] + } + }, + mapping_addition={ + "dynamic": "strict", + "properties": { + "foo": { + "type": "keyword" } } }, diff --git a/docs/examples/cd7da0c3769682f546cc1888e569382e.asciidoc b/docs/examples/cd7da0c3769682f546cc1888e569382e.asciidoc index b117cb26f..ded893b21 100644 --- a/docs/examples/cd7da0c3769682f546cc1888e569382e.asciidoc +++ b/docs/examples/cd7da0c3769682f546cc1888e569382e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:764 +// search/search-your-data/highlighting.asciidoc:776 [source, python] ---- diff --git a/docs/examples/d1d8b6e642db1a7c70dbbf0fe6d8e92d.asciidoc b/docs/examples/d1d8b6e642db1a7c70dbbf0fe6d8e92d.asciidoc index fb9b3dc8c..45bd12593 100644 --- a/docs/examples/d1d8b6e642db1a7c70dbbf0fe6d8e92d.asciidoc +++ b/docs/examples/d1d8b6e642db1a7c70dbbf0fe6d8e92d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/sparse-vector-query.asciidoc:192 +// query-dsl/sparse-vector-query.asciidoc:195 [source, python] ---- diff --git a/docs/examples/d2e7dead222cfbebbd2c21a7cc1893b4.asciidoc b/docs/examples/d2e7dead222cfbebbd2c21a7cc1893b4.asciidoc new file mode 100644 index 000000000..713900e56 --- /dev/null +++ b/docs/examples/d2e7dead222cfbebbd2c21a7cc1893b4.asciidoc @@ -0,0 +1,11 @@ +// This file is autogenerated, DO NOT EDIT +// api-conventions.asciidoc:260 + +[source, python] +---- +resp = client.cluster.state( + metric="metadata", + filter_path="metadata.indices.*.system", +) +print(resp) +---- diff --git a/docs/examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc b/docs/examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc index bda513c8a..210dfef8d 100644 --- a/docs/examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc +++ b/docs/examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc @@ -3,14 +3,9 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_security/oidc/prepare", - headers={"Content-Type": "application/json"}, - body={ - "iss": "http://127.0.0.1:8080", - "login_hint": "this_is_an_opaque_string" - }, +resp = client.security.oidc_prepare_authentication( + iss="http://127.0.0.1:8080", + login_hint="this_is_an_opaque_string", ) print(resp) ---- diff --git a/docs/examples/d3a0f648d0fd50b54a4e9ebe363c5047.asciidoc b/docs/examples/d3a0f648d0fd50b54a4e9ebe363c5047.asciidoc new file mode 100644 index 000000000..fdf783f2b --- /dev/null +++ b/docs/examples/d3a0f648d0fd50b54a4e9ebe363c5047.asciidoc @@ -0,0 +1,48 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:221 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "linear": { + "retrievers": [ + { + "retriever": { + "standard": { + "query": { + "query_string": { + "query": "(information retrieval) OR (artificial intelligence)", + "default_field": "text" + } + } + } + }, + "weight": 2, + "normalizer": "minmax" + }, + { + "retriever": { + "knn": { + "field": "vector", + "query_vector": [ + 0.23, + 0.67, + 0.89 + ], + "k": 3, + "num_candidates": 5 + } + }, + "weight": 1.5, + "normalizer": "minmax" + } + ], + "rank_window_size": 10 + } + }, + source=False, +) +print(resp) +---- diff --git a/docs/examples/d4df39f72d3a3b80cd4042f6a21c3f19.asciidoc b/docs/examples/d4df39f72d3a3b80cd4042f6a21c3f19.asciidoc index 8726658f3..d277e6a15 100644 --- a/docs/examples/d4df39f72d3a3b80cd4042f6a21c3f19.asciidoc +++ b/docs/examples/d4df39f72d3a3b80cd4042f6a21c3f19.asciidoc @@ -3,11 +3,9 @@ [source, python] ---- -resp = client.perform_request( - "PUT", - "/_ingest/ip_location/database/my-database-2", - headers={"Content-Type": "application/json"}, - body={ +resp = client.ingest.put_ip_location_database( + id="my-database-2", + configuration={ "name": "standard_location", "ipinfo": {} }, diff --git a/docs/examples/d6a4548b29e939fb197189c20c7c016f.asciidoc b/docs/examples/d6a4548b29e939fb197189c20c7c016f.asciidoc new file mode 100644 index 000000000..55232f34a --- /dev/null +++ b/docs/examples/d6a4548b29e939fb197189c20c7c016f.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// inference/elastic-infer-service.asciidoc:115 + +[source, python] +---- +resp = client.inference.put( + task_type="chat_completion", + inference_id="chat-completion-endpoint", + inference_config={ + "service": "elastic", + "service_settings": { + "model_id": "model-1" + } + }, +) +print(resp) +---- diff --git a/docs/examples/d8c053ee26c1533ce936ec81101d8e1b.asciidoc b/docs/examples/d8c053ee26c1533ce936ec81101d8e1b.asciidoc index 78590c949..3be18be28 100644 --- a/docs/examples/d8c053ee26c1533ce936ec81101d8e1b.asciidoc +++ b/docs/examples/d8c053ee26c1533ce936ec81101d8e1b.asciidoc @@ -3,9 +3,8 @@ [source, python] ---- -resp = client.perform_request( - "GET", - "/_ingest/ip_location/database/my-database-id", +resp = client.ingest.get_ip_location_database( + id="my-database-id", ) print(resp) ---- diff --git a/docs/examples/d93d52b6057a7aff3d0766ca44c505e0.asciidoc b/docs/examples/d93d52b6057a7aff3d0766ca44c505e0.asciidoc index d6d263200..ccde60cca 100644 --- a/docs/examples/d93d52b6057a7aff3d0766ca44c505e0.asciidoc +++ b/docs/examples/d93d52b6057a7aff3d0766ca44c505e0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:204 +// alias.asciidoc:206 [source, python] ---- diff --git a/docs/examples/dd16c9c981551c9da47ebb5ef5105fa0.asciidoc b/docs/examples/dd16c9c981551c9da47ebb5ef5105fa0.asciidoc new file mode 100644 index 000000000..8ffce9166 --- /dev/null +++ b/docs/examples/dd16c9c981551c9da47ebb5ef5105fa0.asciidoc @@ -0,0 +1,57 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:535 + +[source, python] +---- +resp = client.indices.update_aliases( + actions=[ + { + "add": { + "index": ".reindexed-v9-ml-anomalies-custom-example", + "alias": ".ml-anomalies-example1", + "filter": { + "term": { + "job_id": { + "value": "example1" + } + } + }, + "is_hidden": True + } + }, + { + "add": { + "index": ".reindexed-v9-ml-anomalies-custom-example", + "alias": ".ml-anomalies-example2", + "filter": { + "term": { + "job_id": { + "value": "example2" + } + } + }, + "is_hidden": True + } + }, + { + "remove": { + "index": ".ml-anomalies-custom-example", + "aliases": ".ml-anomalies-*" + } + }, + { + "remove_index": { + "index": ".ml-anomalies-custom-example" + } + }, + { + "add": { + "index": ".reindexed-v9-ml-anomalies-custom-example", + "alias": ".ml-anomalies-custom-example", + "is_hidden": True + } + } + ], +) +print(resp) +---- diff --git a/docs/examples/dd71b0c9f9197684ff29c61062c55660.asciidoc b/docs/examples/dd71b0c9f9197684ff29c61062c55660.asciidoc index 3f2fdfb21..6acf42c3f 100644 --- a/docs/examples/dd71b0c9f9197684ff29c61062c55660.asciidoc +++ b/docs/examples/dd71b0c9f9197684ff29c61062c55660.asciidoc @@ -3,9 +3,6 @@ [source, python] ---- -resp = client.perform_request( - "GET", - "/_security/settings", -) +resp = client.security.get_settings() print(resp) ---- diff --git a/docs/examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc b/docs/examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc index fbbeb3a8f..79eadab36 100644 --- a/docs/examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc +++ b/docs/examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:228 +// esql/multivalued-fields.asciidoc:233 [source, python] ---- diff --git a/docs/examples/dde92fdf3469349ffe2c81764333543a.asciidoc b/docs/examples/dde92fdf3469349ffe2c81764333543a.asciidoc new file mode 100644 index 000000000..2df1ba4b3 --- /dev/null +++ b/docs/examples/dde92fdf3469349ffe2c81764333543a.asciidoc @@ -0,0 +1,14 @@ +// This file is autogenerated, DO NOT EDIT +// migration/apis/create-index-from-source.asciidoc:137 + +[source, python] +---- +resp = client.indices.create_from( + source="my-index", + dest="my-new-index", + create_from={ + "remove_index_blocks": False + }, +) +print(resp) +---- diff --git a/docs/examples/de139866a220124360e5e27d1a736ea4.asciidoc b/docs/examples/de139866a220124360e5e27d1a736ea4.asciidoc index a65c0590d..122457dad 100644 --- a/docs/examples/de139866a220124360e5e27d1a736ea4.asciidoc +++ b/docs/examples/de139866a220124360e5e27d1a736ea4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:286 +// search/search-your-data/sort-search-results.asciidoc:288 [source, python] ---- diff --git a/docs/examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc b/docs/examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc index 0c74e3bf6..17fc821e9 100644 --- a/docs/examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc +++ b/docs/examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc @@ -3,13 +3,8 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_security/oidc/prepare", - headers={"Content-Type": "application/json"}, - body={ - "realm": "oidc1" - }, +resp = client.security.oidc_prepare_authentication( + realm="oidc1", ) print(resp) ---- diff --git a/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc b/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc index a9514e8d7..bdf7f710d 100644 --- a/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc +++ b/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc @@ -3,39 +3,34 @@ [source, python] ---- -resp = client.perform_request( - "POST", - "/_ingest/_simulate", - headers={"Content-Type": "application/json"}, - body={ - "docs": [ - { - "_index": "my-index", - "_id": "123", - "_source": { - "foo": "foo" - } - }, - { - "_index": "my-index", - "_id": "456", - "_source": { - "bar": "rab" - } +resp = client.simulate.ingest( + docs=[ + { + "_index": "my-index", + "_id": "123", + "_source": { + "foo": "foo" } - ], - "component_template_substitutions": { - "my-mappings_template": { - "template": { - "mappings": { - "dynamic": "strict", - "properties": { - "foo": { - "type": "keyword" - }, - "bar": { - "type": "keyword" - } + }, + { + "_index": "my-index", + "_id": "456", + "_source": { + "bar": "rab" + } + } + ], + component_template_substitutions={ + "my-mappings_template": { + "template": { + "mappings": { + "dynamic": "strict", + "properties": { + "foo": { + "type": "keyword" + }, + "bar": { + "type": "keyword" } } } diff --git a/docs/examples/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc b/docs/examples/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc index 4e2a2d9e7..d7d7853cb 100644 --- a/docs/examples/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc +++ b/docs/examples/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:258 +// alias.asciidoc:260 [source, python] ---- diff --git a/docs/examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc b/docs/examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc index 15cb77d28..28e0f8426 100644 --- a/docs/examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc +++ b/docs/examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-examples.asciidoc:198 +// search/search-your-data/retrievers-examples.asciidoc:448 [source, python] ---- diff --git a/docs/examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc b/docs/examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc index 5efa745d0..a3e95dd72 100644 --- a/docs/examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc +++ b/docs/examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:545 +// search/search-your-data/highlighting.asciidoc:557 [source, python] ---- diff --git a/docs/examples/e715fb8c792bf09ac98f0ceca99beb84.asciidoc b/docs/examples/e715fb8c792bf09ac98f0ceca99beb84.asciidoc new file mode 100644 index 000000000..e799bf64f --- /dev/null +++ b/docs/examples/e715fb8c792bf09ac98f0ceca99beb84.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:345 + +[source, python] +---- +resp = client.migration.deprecations( + index=".ml-anomalies-*", +) +print(resp) +---- diff --git a/docs/examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc b/docs/examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc index daca718ee..92bdbacaf 100644 --- a/docs/examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc +++ b/docs/examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:434 +// search/search-your-data/highlighting.asciidoc:446 [source, python] ---- diff --git a/docs/examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc b/docs/examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc index 1e1e3bad5..d9273b092 100644 --- a/docs/examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc +++ b/docs/examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:342 +// search/search-your-data/highlighting.asciidoc:354 [source, python] ---- diff --git a/docs/examples/ec135f0cc0d3f526df68000b2a95c65b.asciidoc b/docs/examples/ec135f0cc0d3f526df68000b2a95c65b.asciidoc new file mode 100644 index 000000000..10f0be019 --- /dev/null +++ b/docs/examples/ec135f0cc0d3f526df68000b2a95c65b.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// migration/migrate_9_0.asciidoc:403 + +[source, python] +---- +resp = client.indices.create_from( + source=".ml-anomalies-custom-example", + dest=".reindexed-v9-ml-anomalies-custom-example", + create_from=None, +) +print(resp) +---- diff --git a/docs/examples/ed5c3b45e8de912faba44507d827eb93.asciidoc b/docs/examples/ed5c3b45e8de912faba44507d827eb93.asciidoc index a099a031c..e6ca4ba6b 100644 --- a/docs/examples/ed5c3b45e8de912faba44507d827eb93.asciidoc +++ b/docs/examples/ed5c3b45e8de912faba44507d827eb93.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:499 +// search/search-your-data/sort-search-results.asciidoc:501 [source, python] ---- diff --git a/docs/examples/edae616e1244babf6032aecc6aaaf836.asciidoc b/docs/examples/edae616e1244babf6032aecc6aaaf836.asciidoc index 342dde9e2..d47895fb1 100644 --- a/docs/examples/edae616e1244babf6032aecc6aaaf836.asciidoc +++ b/docs/examples/edae616e1244babf6032aecc6aaaf836.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:472 +// search/search-your-data/sort-search-results.asciidoc:474 [source, python] ---- diff --git a/docs/examples/edb25dc0162b039d477cb06aed2d6275.asciidoc b/docs/examples/edb25dc0162b039d477cb06aed2d6275.asciidoc index 90f2ebf6c..76902ca50 100644 --- a/docs/examples/edb25dc0162b039d477cb06aed2d6275.asciidoc +++ b/docs/examples/edb25dc0162b039d477cb06aed2d6275.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/sparse-vector-query.asciidoc:149 +// query-dsl/sparse-vector-query.asciidoc:152 [source, python] ---- diff --git a/docs/examples/ee08328cd157d547de19b4abe867b23e.asciidoc b/docs/examples/ee08328cd157d547de19b4abe867b23e.asciidoc index b149f81c4..b50d454fe 100644 --- a/docs/examples/ee08328cd157d547de19b4abe867b23e.asciidoc +++ b/docs/examples/ee08328cd157d547de19b4abe867b23e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// alias.asciidoc:275 +// alias.asciidoc:277 [source, python] ---- diff --git a/docs/examples/f29b2674299ddf51a25ed87619025ede.asciidoc b/docs/examples/f29b2674299ddf51a25ed87619025ede.asciidoc index ce3e50526..dfae20141 100644 --- a/docs/examples/f29b2674299ddf51a25ed87619025ede.asciidoc +++ b/docs/examples/f29b2674299ddf51a25ed87619025ede.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/apis/rollup-search.asciidoc:121 +// rollup/apis/rollup-search.asciidoc:122 [source, python] ---- diff --git a/docs/examples/f39512478cae2db8f4566a1e4af9e8f5.asciidoc b/docs/examples/f39512478cae2db8f4566a1e4af9e8f5.asciidoc index 271a51425..569f9d2ad 100644 --- a/docs/examples/f39512478cae2db8f4566a1e4af9e8f5.asciidoc +++ b/docs/examples/f39512478cae2db8f4566a1e4af9e8f5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/rollup-getting-started.asciidoc:213 +// rollup/rollup-getting-started.asciidoc:217 [source, python] ---- diff --git a/docs/examples/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc b/docs/examples/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc index d66ed0a8c..f851ff1bc 100644 --- a/docs/examples/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc +++ b/docs/examples/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/apis/rollup-caps.asciidoc:178 +// rollup/apis/rollup-caps.asciidoc:181 [source, python] ---- diff --git a/docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc b/docs/examples/f994498dd6576be657dedce2822d2b9e.asciidoc similarity index 82% rename from docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc rename to docs/examples/f994498dd6576be657dedce2822d2b9e.asciidoc index 9615a7520..b29501e73 100644 --- a/docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc +++ b/docs/examples/f994498dd6576be657dedce2822d2b9e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-text-hybrid-search:118 +// search/search-your-data/semantic-text-hybrid-search:119 [source, python] ---- @@ -30,6 +30,13 @@ resp = client.search( ] } }, + highlight={ + "fields": { + "semantic_text": { + "number_of_fragments": 2 + } + } + }, ) print(resp) ---- diff --git a/docs/examples/fbb38243221c8fb311660616e3add9ce.asciidoc b/docs/examples/fbb38243221c8fb311660616e3add9ce.asciidoc index f3511fb9a..25a5cb185 100644 --- a/docs/examples/fbb38243221c8fb311660616e3add9ce.asciidoc +++ b/docs/examples/fbb38243221c8fb311660616e3add9ce.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:418 +// search/search-your-data/sort-search-results.asciidoc:420 [source, python] ---- diff --git a/docs/examples/fe208d94ec93eabf3bd06139fa70701e.asciidoc b/docs/examples/fe208d94ec93eabf3bd06139fa70701e.asciidoc index 21882266f..f38b22cb3 100644 --- a/docs/examples/fe208d94ec93eabf3bd06139fa70701e.asciidoc +++ b/docs/examples/fe208d94ec93eabf3bd06139fa70701e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rollup/migrating-to-downsampling.asciidoc:58 +// rollup/migrating-to-downsampling.asciidoc:59 [source, python] ---- diff --git a/docs/examples/fe3a927d868cbc530e08e05964d5174a.asciidoc b/docs/examples/fe3a927d868cbc530e08e05964d5174a.asciidoc index adad0a7f7..17408d56f 100644 --- a/docs/examples/fe3a927d868cbc530e08e05964d5174a.asciidoc +++ b/docs/examples/fe3a927d868cbc530e08e05964d5174a.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/sort-search-results.asciidoc:115 +// search/search-your-data/sort-search-results.asciidoc:117 [source, python] ---- diff --git a/docs/examples/681d24c2633f598fc43d6afff8996dbb.asciidoc b/docs/examples/ffda10edaa7ce087703193c3cb95a426.asciidoc similarity index 90% rename from docs/examples/681d24c2633f598fc43d6afff8996dbb.asciidoc rename to docs/examples/ffda10edaa7ce087703193c3cb95a426.asciidoc index 79fe95816..d88901a8f 100644 --- a/docs/examples/681d24c2633f598fc43d6afff8996dbb.asciidoc +++ b/docs/examples/ffda10edaa7ce087703193c3cb95a426.asciidoc @@ -27,6 +27,9 @@ resp = client.indices.create( }, "topic": { "type": "keyword" + }, + "timestamp": { + "type": "date" } } }, @@ -48,7 +51,8 @@ resp1 = client.index( "llm", "ai", "information_retrieval" - ] + ], + "timestamp": "2021-01-01T12:10:30" }, ) print(resp1) @@ -67,7 +71,8 @@ resp2 = client.index( "topic": [ "ai", "medicine" - ] + ], + "timestamp": "2022-01-01T12:10:30" }, ) print(resp2) @@ -86,7 +91,8 @@ resp3 = client.index( "topic": [ "ai", "security" - ] + ], + "timestamp": "2023-01-01T12:10:30" }, ) print(resp3) @@ -106,7 +112,8 @@ resp4 = client.index( "ai", "elastic", "assistant" - ] + ], + "timestamp": "2024-01-01T12:10:30" }, ) print(resp4) @@ -126,7 +133,8 @@ resp5 = client.index( "documentation", "observability", "elastic" - ] + ], + "timestamp": "2025-01-01T12:10:30" }, ) print(resp5) diff --git a/docs/guide/release-notes.asciidoc b/docs/guide/release-notes.asciidoc index 1b8d3957f..069cedc39 100644 --- a/docs/guide/release-notes.asciidoc +++ b/docs/guide/release-notes.asciidoc @@ -1,6 +1,7 @@ [[release-notes]] == Release notes +* <> * <> * <> * <> @@ -44,6 +45,18 @@ * <> * <> +[discrete] +[[rn-8-17-2]] +=== 8.17.2 (2025-03-04) + +- Explain how to use sub clients in API docs (https://github.com/elastic/elasticsearch-py/pull/2798[#2798]) +- Render descriptions as Markdown in API docs +- Update APIs + * Add `keep_alive` to Submit async search API + * Add `Run and Delete` an async ES|QL query APIs + * Add Get async ES|QL query results API + * Add `include_ccs_metadata` to ES|QL query API + [discrete] [[rn-8-17-1]] === 8.17.1 (2025-01-23) diff --git a/elasticsearch/_version.py b/elasticsearch/_version.py index d1cc6c87a..00e2789aa 100644 --- a/elasticsearch/_version.py +++ b/elasticsearch/_version.py @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -__versionstr__ = "8.17.1" +__versionstr__ = "8.17.2" diff --git a/utils/generate-docs-examples/package-lock.json b/utils/generate-docs-examples/package-lock.json index 6c4f1bc41..7c255e572 100644 --- a/utils/generate-docs-examples/package-lock.json +++ b/utils/generate-docs-examples/package-lock.json @@ -17,12 +17,12 @@ } }, "node_modules/@elastic/request-converter": { - "version": "8.16.1", - "resolved": "https://registry.npmjs.org/@elastic/request-converter/-/request-converter-8.16.1.tgz", - "integrity": "sha512-lg2qCJ4kyxsP/0NpZo0+NsJfaY4JwyxGIVqD2l2Vmx9tv7ZNaZMn/TjHKBo2+jN0laJBInpxpnkPUgVWo5kw1g==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@elastic/request-converter/-/request-converter-8.18.0.tgz", + "integrity": "sha512-xEIB17voGulAfBThFqqtk8Osc+dNHiCqN9GW0Nf6PunNdvmAT5YvMb6u4NNI+NPAxNu90ak396g+ThjH9VRGIw==", "license": "Apache-2.0", "dependencies": { - "child-process-promise": "^2.2.1", + "base64url": "^3.0.1", "commander": "^12.1.0", "find-my-way-ts": "^0.1.2", "handlebars": "^4.7.8", @@ -82,6 +82,15 @@ ], "license": "MIT" }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -143,17 +152,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/child-process-promise": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/child-process-promise/-/child-process-promise-2.2.1.tgz", - "integrity": "sha512-Fi4aNdqBsr0mv+jgWxcZ/7rAIC2mgihrptyVI4foh/rrjY/3BNjfP9+oaiFx/fzim+1ZyCNBae0DlyfQhSugog==", - "license": "MIT", - "dependencies": { - "cross-spawn": "^4.0.2", - "node-version": "^1.0.0", - "promise-polyfill": "^6.0.1" - } - }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -220,16 +218,6 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "license": "MIT" }, - "node_modules/cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA==", - "license": "MIT", - "dependencies": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -363,12 +351,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -385,16 +367,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "license": "ISC", - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -451,15 +423,6 @@ } } }, - "node_modules/node-version": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/node-version/-/node-version-1.2.0.tgz", - "integrity": "sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -531,18 +494,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/promise-polyfill": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz", - "integrity": "sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ==", - "license": "MIT" - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "license": "ISC" - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -704,18 +655,6 @@ "webidl-conversions": "^3.0.0" } }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -727,12 +666,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "license": "ISC" - }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "license": "ISC" } } }