From 4303c54d611665849a0ac2d7621fd792130944a9 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 26 Sep 2023 10:56:53 +0400 Subject: [PATCH 1/2] Fix example generation --- .../014b788c879e4aaa1020672e45e25473.asciidoc | 13 ----- .../0163af36c8472ac0c5160c8b716f5b26.asciidoc | 15 ++++++ ...0246f73cc2ed3dfec577119e8cd15404.asciidoc} | 4 +- .../025b54db0edc50c24ea48a2bd94366ad.asciidoc | 9 ---- ...0264e994a7e68561e2ca6be0f0d90ee9.asciidoc} | 2 +- .../0308cbd85281f95fc458042afe3f587d.asciidoc | 11 ++++ .../033778305d52746f5ce0a2a922c8e521.asciidoc | 20 ------- .../047266b0d20fdb62ebc72d51952c8f6d.asciidoc | 2 +- .../048d8abd42d094bbdcf4452a58ccb35b.asciidoc | 15 ------ .../04f5dd677c777bcb15d7d5fa63275fc8.asciidoc | 7 ++- .../04fe1e3a0047b0cdb10987b79fc3f3f3.asciidoc | 22 -------- .../073539a7e38be3cdf13008330b6a536a.asciidoc | 7 --- ...07ba3eaa931f2cf110052e3544db51f8.asciidoc} | 6 +-- ...095d60b2cfc5004c97efc49f27287262.asciidoc} | 2 +- .../0989cc65d8924f666ce3eb0820d2d244.asciidoc | 14 ----- .../09cdd5ae8114c49886026fef8d00a19c.asciidoc | 10 ---- .../09d617863a103c82fb4101e6165ea7fe.asciidoc | 4 +- .../09dbd90c5e22ea4a17b4cf9aa72e08ae.asciidoc | 10 ---- .../0ba0b2db24852abccb7c0fc1098d566e.asciidoc | 12 ----- .../0be2c28ee65384774b1e479b47dc3d92.asciidoc | 9 ---- .../0c4ad860a485fe53d8140ad3ccd11dcf.asciidoc | 13 ----- .../0c892d328b73d38396aaef6d9cbcd36b.asciidoc | 11 ++++ .../0cc991e3f7f8511a34730e154b3c5edc.asciidoc | 12 ----- .../0ce3606f1dba490eef83c4317b315b62.asciidoc | 9 ---- .../0e118857b815b62118a30c042f079db1.asciidoc | 2 +- .../0e3b4a48a3450cd99c95ec46d4701b58.asciidoc | 23 ++++++++ .../0e5db64154a722a5cbdb84b588ce2ce8.asciidoc | 24 +++++++++ .../1027ab1ca767ac1428176ef4f84bfbcf.asciidoc | 24 --------- .../111c69ca94162c1523b799a5c14723dd.asciidoc | 11 ++++ ...1153bd92ca18356db927054958cd95c6.asciidoc} | 2 +- .../12433d2b637d002e8d5c9a1adce69d3b.asciidoc | 6 ++- .../1252fa45847edba5ec2b2f33da70ec5b.asciidoc | 7 --- .../1259a9c151730e42de35bb2d1ba700c6.asciidoc | 9 ++++ .../137709a0a0dc38d6094291c9fc75b804.asciidoc | 11 ++++ .../138ccd89f72aa7502dd9578403dcc589.asciidoc | 7 --- .../138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc | 12 +++++ .../13d90ba227131aefbf4fcfd5992e662a.asciidoc | 38 +++++++++++++ .../14701dcc0cca9665fce2aace0cb62af7.asciidoc | 12 ----- ...151d2b11807ec684b0c01aa89189a801.asciidoc} | 2 +- .../15dad5338065baaaa7d475abe85f4c22.asciidoc | 20 ------- .../178c920d5e8ec0071f77290fa059802c.asciidoc | 10 ++++ .../179f0a3e84ff4bbac18787a018eabf89.asciidoc | 2 +- .../189a921df2f5b1fe580937210ce9c1c2.asciidoc | 9 ---- .../18ddb7e7a4bcafd449df956e828ed7a8.asciidoc | 6 ++- .../1aa91d3d48140d6367b6cabca8737b8f.asciidoc | 2 +- .../1b542e3ea87a742f95641d64dcfb1bdb.asciidoc | 7 --- .../1b8655e6ba99fe39933c6eafe78728b7.asciidoc | 20 ------- .../1b8caf0a6741126c6d0ad83b56fce290.asciidoc | 21 -------- .../1cab9da122778a95061831265c250cc1.asciidoc | 19 +++++++ .../1d65cb6d055c46a1bde809687d835b71.asciidoc | 7 --- .../1da77e114459e0b77d78a3dcc8fae429.asciidoc | 16 ------ .../1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc | 7 --- .../1e18a67caf8f06ff2710ec4a8b30f625.asciidoc | 12 ----- .../1e49eba5b9042c1900a608fe5105ba43.asciidoc | 22 -------- .../1e50d993bd6517e6c381e82d09f0389e.asciidoc | 13 ----- ...1e871f060dbe1a5c316ed205278804a8.asciidoc} | 2 +- .../1f336ecc62480c1d56351cc2f82d0d08.asciidoc | 15 ------ ...1f673e1a0de2970dc648618d5425a994.asciidoc} | 5 +- ...20005d8a6555b259b299d862cd218701.asciidoc} | 0 .../210cf5c76bff517f48e80fa1c2d63907.asciidoc | 7 --- .../213ab768f1b6a895e09403a0880e259a.asciidoc | 22 -------- .../216848930c2d344fe0bed0daa70c35b9.asciidoc | 7 ++- .../2224143c45dfc83a2d10b98cd4f94bb5.asciidoc | 25 +++++++++ .../22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc | 46 ---------------- .../231aa0bb39c35fe199d28fe0e4a62b2e.asciidoc | 10 ---- .../23ab0f1023b1b2cd5cdf2a8f9ccfd57b.asciidoc | 10 ---- ...242a26ced0e5706e48dcda19a4003094.asciidoc} | 6 +-- .../2468ab381257d759d8a88af1141f6f9c.asciidoc | 7 --- .../251ea12c1248385ab409906ac64d9ee9.asciidoc | 19 ------- ...25576b6773322f0929d4c635a940dba0.asciidoc} | 2 +- ...25a0dad6547d432f5a3d394528f1c138.asciidoc} | 4 +- .../2891aa10ee9d474780adf94d5607f2db.asciidoc | 10 ---- ...28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc} | 3 +- .../2932e6f71e247cf52e11d2f38f114ddf.asciidoc | 14 +++++ .../2a247e36a86a373bcbf478ac9a588f44.asciidoc | 15 ++++++ ...2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc} | 2 +- .../2c3dff44904d3d73ff47f1afe89c7f86.asciidoc | 10 ++++ .../2d01a9e5550b525496757f1bd7f0e706.asciidoc | 16 ++++++ ...2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc} | 0 ...2fa45d74ba9933188c4728f8a9e5372c.asciidoc} | 4 +- .../2fd69fb0538e4f36ac69a8b8f8bf5ae8.asciidoc | 13 ----- .../2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc | 2 +- ...2fea3e324939cc7e9c396964aeee7111.asciidoc} | 0 .../30f3e3b9df46afd12e68bc71f18483b4.asciidoc | 24 +++++++++ .../311c4b632a29b9ead63b02d01f10096b.asciidoc | 7 --- ...316cd43feb3b86396483903af1a048b1.asciidoc} | 2 +- .../33f148e3d8676de6cc52f58749898a13.asciidoc | 2 +- .../344b4144244d57f87c6aa4652b100b25.asciidoc | 11 ++++ .../3544f17cb97b613a2f733707c676f759.asciidoc | 24 +++++++++ .../355d0ee2fcb6c1fc403c6267f710e25a.asciidoc | 12 +++++ .../36063ff9a318dba7bb0be3a230655dc8.asciidoc | 22 ++++++++ .../3653567181f43a5f64c74f934aa821c2.asciidoc | 9 ---- .../36818c6d9f434d387819c30bd9addb14.asciidoc | 14 ----- .../3722cb3705b6bc7f486969deace3dd83.asciidoc | 17 ------ ...37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc} | 2 +- ...378e55f78fa13578a1302bae8d479765.asciidoc} | 4 +- .../381fced1882ca8337143e6bb180a5715.asciidoc | 9 ---- .../38c1d0f6668e9563c0827f839f9fa505.asciidoc | 9 ---- .../39ce44333d28ed2b833722d3e3cb06f3.asciidoc | 39 ++++++++++++++ .../3a700f836d8d5da1b656a876554028aa.asciidoc | 14 ----- .../3ae03ba3b56e5e287953094050766738.asciidoc | 12 ----- .../3b04cc894e6a47d57983484010feac0c.asciidoc | 12 +++-- .../3b8ab7027e0d616fb432acd8813e086c.asciidoc | 15 ++++++ ...3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc} | 6 +-- ...3d1a0e1dc5310544d032108ae0b3f099.asciidoc} | 4 +- .../3d1ff6097e2359f927c88c2ccdb36252.asciidoc | 7 --- .../3db2b5a6424aa92ecab7a8640c38685a.asciidoc | 10 ++++ .../3f3b3e207f79303ce6f86e03e928e062.asciidoc | 7 --- ...3faf5e2873de340acfe0a617017db784.asciidoc} | 2 +- .../400e89eb46ead8e9c9e40f123fd5e590.asciidoc | 2 +- .../4113c57384aa37c58d11579e20c00760.asciidoc | 11 ++++ ...41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc} | 2 +- ...41dbd79f624b998d01c10921e9a35c4b.asciidoc} | 2 +- .../42744a175125df5be0ef77413bf8f608.asciidoc | 9 ---- .../427f6b5c5376cbf0f71f242a60ca3d9e.asciidoc | 7 --- ...436d50b85fc8f0977d02059eec00719b.asciidoc} | 2 +- .../44da736ce0e1587c1e7c45eee606ead7.asciidoc | 13 +++++ .../4646764bf09911fee7d58630c72d3137.asciidoc | 20 ------- .../46658f00edc4865dfe472a392374cd0f.asciidoc | 9 ---- ...472ec8c57fec8457e31fe6dd7f6e3713.asciidoc} | 2 +- .../47b5ff897f26e9c943cee5c06034181d.asciidoc | 7 --- .../47bb632c6091ad0cd94bc660bdd309a5.asciidoc | 17 ------ .../4824a823a830a2a5d990eacfd783ac22.asciidoc | 22 ++++++++ .../4955bae30f265b9e436f82b015de6d7e.asciidoc | 21 ++++++++ ...4a2080ae55d931eb0643cc3eb91ec524.asciidoc} | 14 +++-- .../4acf902c2598b2558f34f20c1744c433.asciidoc | 12 ----- ...4b1044259a6d777d87529eae25675005.asciidoc} | 7 ++- .../4b90feb9d5d3dbfce424dac0341320b7.asciidoc | 15 ------ ...4ba86373e13e106de044f190343be328.asciidoc} | 2 +- .../4bc744b0f33b322741a8caf6d8d7d765.asciidoc | 16 ++++++ ...4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc} | 0 ...4f3366fc26e7ea4de446dfa5cdec9683.asciidoc} | 2 +- .../506844befdc5691d835771bcbb1c1a60.asciidoc | 10 ---- .../50b5c0332949d2154c72b629b5fa6222.asciidoc | 18 +++++++ ...51b40610ae05730b4c6afd25647d7ae0.asciidoc} | 8 +-- .../5203560189ccab7122c03500147701ef.asciidoc | 6 +++ .../5275842787967b6db876025f4a1c6942.asciidoc | 2 +- .../52a87b81e4e0b6b11e23e85db1602a63.asciidoc | 11 ---- .../52b2bfbdd78f8283b6f4891c48013237.asciidoc | 13 ----- .../52c7e4172a446c394210a07c464c57d2.asciidoc | 5 +- ...52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc} | 4 +- ...5330191ec9f11281ebf6867bf11c58ae.asciidoc} | 4 +- .../53d938c754f36a912fcbe6473abb463f.asciidoc | 9 ---- ...54a215d242ab65123b09e9dfb71bcbbf.asciidoc} | 2 +- .../54a770f053f3225ea0d1e34334232411.asciidoc | 7 --- ...5553cf7a02c22f616cd994747f2dd5a5.asciidoc} | 2 +- .../56a1aa4f7fa62f2289e20607e3039bf3.asciidoc | 10 ++++ ...56a903530990313b753b1be33578997a.asciidoc} | 6 +-- .../5925c23a173a63bdb30b458248d1df76.asciidoc | 7 --- .../5b58007f10700ec7934580f034404652.asciidoc | 15 ++++++ .../5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc | 17 ++++++ .../5be23858b35043fcb7b50fe36b873e6e.asciidoc | 9 ---- .../5c2f486c27bd5346e512265f93375d16.asciidoc | 2 +- ...5c6fbeac20dc23b613847f35d431ecab.asciidoc} | 0 ...5d03bb385904d20c5323885706738459.asciidoc} | 4 +- .../5d32279dcd52b22d9e1178a02a3ad957.asciidoc | 15 ------ .../5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc | 2 +- .../5da6efd5b038ada64c9e853c88c1ec47.asciidoc | 2 +- ...5dfe24287bb930ad33345caf092a004b.asciidoc} | 4 +- .../5eabcdbf61bfcb484dc694f25c2bba36.asciidoc | 9 ---- ...5f1ed9cfdc149763b444acfbe10b0e16.asciidoc} | 4 +- .../5f210f74725ea0c9265190346edfa246.asciidoc | 13 ----- .../5f3549ac7fee94682ca0d7439eebdd2a.asciidoc | 10 ---- .../609260ad1d5998be2ca09ff1fe237efa.asciidoc | 7 --- ...60f889fbed5df3185444f7015b48ed76.asciidoc} | 4 +- .../621665fdbd7fc103c09bfeed28b67b1a.asciidoc | 7 --- .../625dc94df1f9affb49a082fd99d41620.asciidoc | 15 ------ .../633c8a9fc57268979d8735c557705809.asciidoc | 22 ++++++++ ...63cc960215ae83b359c12df3c0993bfa.asciidoc} | 4 +- .../63d1c07d22a3ca3b0ec6d950547c011c.asciidoc | 22 ++++++++ ...641f75862c70e25e79d249d9e0a79f03.asciidoc} | 2 +- .../645136747d37368a14ab34de8bd046c6.asciidoc | 26 --------- .../645796e8047967ca4a7635a22a876f4c.asciidoc | 21 -------- .../6464124d1677f4552ddddd95a340ca3a.asciidoc | 30 ----------- ...64aff98cf477555e7411714c17006572.asciidoc} | 4 +- .../64b9baa6d7556b960b29698f3383aa31.asciidoc | 2 +- ...653c0d0ef146c997ef6bc6450d4f5f94.asciidoc} | 2 +- .../67bba546d835bca8f31df13e3587c348.asciidoc | 7 --- .../68721288dc9ad8aa1b55099b4d303051.asciidoc | 2 +- .../68738b4fd0dda177022be45be95b4c84.asciidoc | 5 +- .../69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc | 11 ++++ .../69c07cfdf8054c301cd6186c5d71aa02.asciidoc | 9 ++++ .../6a81d00f0d73bc5985e76b3cadab645e.asciidoc | 24 --------- ...6aa2941855d13f365f70aa8767ecb137.asciidoc} | 16 ++++-- ...6b0288acb739c4667d41339e5100c327.asciidoc} | 0 .../6b1e837a8469eca2d03d5c36f5910f34.asciidoc | 20 +++++++ ...6b77795e9249c8d9865f7a49fd86a863.asciidoc} | 0 .../6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc | 2 +- ...6c00dae1a456ae5e854e98e895dca2ab.asciidoc} | 2 +- ...6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc} | 2 +- ...6cd083045bf06e80b83889a939a18451.asciidoc} | 8 +-- .../6d1e75312a28a5ba23837abf768f2510.asciidoc | 9 ---- ...6e000496a1fa8b57148518eaad692f35.asciidoc} | 4 +- .../6f097c298a7abf4c032c4314920c49c8.asciidoc | 12 ----- .../6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc | 22 -------- .../710c7871f20f176d51209b1574b0d61b.asciidoc | 9 ---- ...711443504b69d0d296e717c716a223e2.asciidoc} | 2 +- .../71ba9033107882f61cdc3b32fc73568d.asciidoc | 12 ----- .../72beebe779a258c225dee7b023e60c52.asciidoc | 7 --- .../73be1f93d789264e5b972ddb5991bc66.asciidoc | 9 ++++ .../745f9b8cdb8e91073f6e520e1d9f8c05.asciidoc | 7 --- .../746e0a1cb5984f2672963b363505c7b3.asciidoc | 33 ++++++++++++ .../7477671958734843dd67cf0b8e6c7515.asciidoc | 10 ---- .../74a80c28737a0648db0dfe7f049d12f2.asciidoc | 10 ++++ .../764f9884b370cbdc82a1c5c42ed40ff3.asciidoc | 15 ------ .../77113c65e1755313183a8969233a5a07.asciidoc | 22 ++++++++ .../77243bbf92f2a55e0fca6c2a349a1c15.asciidoc | 20 ------- .../7841b65a3bb880ed66cec453925a50cf.asciidoc | 10 ++++ .../78c96113ae4ed0054e581b17542528a7.asciidoc | 2 +- .../7ae434b3667c589a8e70fe560f4ee3f9.asciidoc | 10 ++++ ...7b5c231526846f2f7b98d78f3656ae6a.asciidoc} | 2 +- .../7b7a828c21c856a3cbc41fd2f85108bf.asciidoc | 15 ++++++ .../7b908b1189f076942de8cd497ff1fa59.asciidoc | 2 +- ...7ca224d1a7de20a15c008e1b9dbda377.asciidoc} | 2 +- .../7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc | 10 ++++ .../7cf71671859be7c1ecf673396db377cd.asciidoc | 19 ------- .../7df191cc7f814e410a4ac7261065e6ef.asciidoc | 7 ++- .../7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc | 12 +++++ .../7e52bec09624cf6c0de5d13f2bfad5a5.asciidoc | 11 ---- .../7f697eb436dfa3c30dfe610d8c32d132.asciidoc | 2 +- ...7fef68840761c6982c14ad7af96caf37.asciidoc} | 2 +- ...803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc} | 4 +- ...85479e02af00681210e17e3d0ff51e21.asciidoc} | 4 +- .../8653e76676de5d327201b77512afa3a0.asciidoc | 9 ---- .../873fbbc6ab81409058591385fd602736.asciidoc | 2 +- .../87416e6a1ca2da324dbed6deb05303eb.asciidoc | 24 +++++++++ .../899eef71a67a1b2aa11a2166ec7f48f1.asciidoc | 12 ----- .../89a8ac1509936acc272fc2d72907bc45.asciidoc | 7 --- ...8a1f6cffa653800282c0ae160ee375bc.asciidoc} | 2 +- .../8acc1d67b152e7027e0f0e1a8b4b2431.asciidoc | 20 ------- .../8c5977410335d58217e0626618ce6641.asciidoc | 7 --- .../8c8b5224befab7804461c7e7b6086d9a.asciidoc | 25 +++++++++ .../8c9081dc738d1290fd76071b283fcaec.asciidoc | 11 ++++ .../8cd00a3aba7c3c158277bc032aac2830.asciidoc | 2 +- .../8d9a63d7c31f08bd27d92ece3de1649c.asciidoc | 22 -------- .../8e286a205a1f84f888a6d99f2620c80e.asciidoc | 9 ++++ .../8e6bfb4441ffa15c86d5dc20fa083571.asciidoc | 9 ---- ...8eac28d2e9b6482b413d61817456a14f.asciidoc} | 2 +- ...8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc} | 2 +- ...8ee9521f57661a050efb614f02b4a090.asciidoc} | 2 +- .../8f0511f8a5cb176ff2afdd4311799a33.asciidoc | 17 ------ ...8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc} | 2 +- .../9166cf38427d5cde5d2ec12a2012b669.asciidoc | 15 ------ ...926c0134aeaad53bd0f3bdad9c430217.asciidoc} | 4 +- ...934aa38c3adcc4cf74ea40cd8736876c.asciidoc} | 2 +- ...9403764e6eccad7b321b65e9a10c5727.asciidoc} | 2 +- .../946522c26d02bebf5c527ba28e55c724.asciidoc | 10 ++++ ...9467e52087a13b63b02d78c35ff6f798.asciidoc} | 0 ...957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc} | 2 +- .../95b3f53f2065737bbeba6199e8a12df3.asciidoc | 11 ++++ .../973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc | 2 +- .../978088f989d45dd09339582e9cbc60e0.asciidoc | 10 ---- .../979d25dff2d8987119410291ad47b0d1.asciidoc | 20 ------- .../97babc8d19ef0866774576716eb6d19e.asciidoc | 6 ++- .../98234499cfec70487cec5d013e976a84.asciidoc | 7 --- ...996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc} | 2 +- .../99a52be903945b17e734a1d02a57e958.asciidoc | 9 ---- ...9a02bd47c000a3d9a8911233c37c890f.asciidoc} | 8 +-- .../9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc | 2 +- ...9bae72e974bdeb56007d9104e73eff92.asciidoc} | 2 +- ...9bfdda207b701028a3439e495e800c02.asciidoc} | 2 +- .../9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc | 12 +++++ ...9f04cc1a0c6cdb3ed2247f1399713767.asciidoc} | 4 +- ...a0c868282c0514a342ad04998cdc2175.asciidoc} | 4 +- .../a0f4e902d18460337684d74ea932fbe9.asciidoc | 11 ++++ .../a1db5c822745fe167e9ef854dca3d129.asciidoc | 20 ------- .../a2b2ce031120dac49b5120b26eea8758.asciidoc | 11 ++++ .../a34d70d7022eb4ba48909d440c80390f.asciidoc | 8 ++- .../a3e79d6c626a490341c5b731acbb4a5d.asciidoc | 10 ++++ .../a49169b4622918992411fab4ec48191b.asciidoc | 21 -------- .../a4a396cd07657b3977713fb3a742c41b.asciidoc | 7 --- .../a5a7050fb9dcb9574e081957ade28617.asciidoc | 12 ----- ...a5f9eb40087921e67d820775acf71522.asciidoc} | 4 +- ...a692b4c0ca7825c467880b346841f5a5.asciidoc} | 4 +- .../a6bb306ca250cf651f19cae808b97012.asciidoc | 9 ++++ .../a6f8636b03cc5f677b7d89e750328612.asciidoc | 7 --- .../a6fdd0100cd362df54af6c95d1055c96.asciidoc | 9 ++++ ...a72613de3774571ba24def4b495161b5.asciidoc} | 4 +- .../a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc | 11 ++++ .../a7c15fe6b5779c84ce9a34bf4b2a7ab7.asciidoc | 10 ---- .../a84ffbaa4ffa68b22f6fe42d3b4f8dd5.asciidoc | 6 +++ .../a8fba09a46b2c3524428aa3259b7124f.asciidoc | 7 --- ...a9fe70387d9c96a07830e1859c57efbb.asciidoc} | 4 +- .../aaa7a61b07861235fb6e489b946c705c.asciidoc | 13 +++++ .../ab8b4537fad80107bc88f633d4039a52.asciidoc | 10 ++++ .../abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc | 2 +- .../abf329ebefaf58acd4ee30e685731499.asciidoc | 10 ---- ...ac497917ef707538198a8458ae3d5c6b.asciidoc} | 0 ...ac73895ca1882cd1ac65b1facfbb5c63.asciidoc} | 4 +- ...acc6cd860032167e34fa5e0c043ab3b0.asciidoc} | 2 +- .../ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc | 2 +- ...ad2416ca0581316cee6c63129685bca5.asciidoc} | 2 +- .../ad3b159657d4bcb373623fdc61acc3bf.asciidoc | 10 ++++ .../ad79228630684d950fe9792a768d24c5.asciidoc | 26 --------- .../ae9b5fbd42af2386ffbf56ad4a697e51.asciidoc | 19 ------- .../ae9ccfaa146731ab9176df90670db1c2.asciidoc | 2 +- .../af3fb9fa5691a7b37a6dc2a69ff66e64.asciidoc | 14 ----- ...af44cc7fb0c435d4497c77baf904bf5e.asciidoc} | 2 +- .../b02e4907c9936c1adc16ccce9d49900d.asciidoc | 2 +- .../b0d64d0a554549e5b2808002a0725493.asciidoc | 11 ---- .../b0eaf67e5cce24ef8889bf20951ccec1.asciidoc | 2 +- .../b0ec418bf416c62bed602b0a32a6d5f5.asciidoc | 7 --- .../b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc | 11 ++++ ...b10668cc742e666fe0eb6a53fd38a93e.asciidoc} | 2 +- .../b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc | 2 +- .../b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc | 14 +++++ ...b3a711c3deddcdb8a3f6623184a8b794.asciidoc} | 2 +- .../b41dce56b0e640d32b1cf452f87cec17.asciidoc | 12 ----- .../b4392116f2cc57ce8064ccbad30318d5.asciidoc | 9 ---- .../b515427f8685ca7d79176def672d19fa.asciidoc | 15 ++++++ .../b58b17975bbce307b2ccce5051a449e8.asciidoc | 12 +++++ .../b5f95bc097a201b29c7200fc8d3d31c1.asciidoc | 26 --------- ...b6c872d04eabb39d1947cde6b29d4ae1.asciidoc} | 2 +- .../b7a9f60b3646efe3834ca8381f8aa560.asciidoc | 9 ++++ .../b918d6b798da673a33e49b94f61dcdc0.asciidoc | 16 ------ ...b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc} | 2 +- .../b94cee0f74f57742b3948f9b784dfdd4.asciidoc | 12 ----- .../b997885974522ef439d5e345924cc5ba.asciidoc | 20 ------- .../b9a153725b28fdd0a5aabd7f17a8c2d7.asciidoc | 7 --- .../ba59a3b9a0a2694704b2bf9c6ad4a8cf.asciidoc | 6 +++ .../bb143628fd04070683eeeadc9406d9cc.asciidoc | 15 ------ .../bc1ad5cc6d3eab98e3ce01f209ba7094.asciidoc | 13 ----- .../bd23c3a03907b1238dcb07ab9eecae7b.asciidoc | 10 ++++ .../bdb30dd52d32f50994008f4f9c0da5f0.asciidoc | 5 +- .../be3a6431d01846950dc1a39a7a6a1faa.asciidoc | 6 ++- ...be5b415d7f33d6f0397ac2f8b5c10521.asciidoc} | 4 +- .../be5fef0640c3a650ee96f84e3376a1be.asciidoc | 18 +++++++ .../be8f28f31207b173de61be032fcf239c.asciidoc | 7 --- ...beb0b9ff4f68672273fcff1b7bae706b.asciidoc} | 4 +- .../bfcd65ab85d684d36a8550080032958d.asciidoc | 7 --- .../bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc | 2 +- .../c06b96352e15f0161705fee0b5925776.asciidoc | 6 +++ ...c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc} | 2 +- ...c0ebaa33e750b87555dc352073f692e8.asciidoc} | 12 +++-- ...c0ff8b3db994c4736f7579dde18097d2.asciidoc} | 4 +- ...c1a895497066a3dac674d4b1a119048d.asciidoc} | 4 +- .../c22b72c4a52ee098331b3f252c22860d.asciidoc | 9 ---- .../c2c21e2824fbf6b7198ede30419da82b.asciidoc | 7 --- .../c48264ec5d9b9679fddd72e5c44425b9.asciidoc | 7 --- .../c526fca1609b4c3c1d12dfd218d69a50.asciidoc | 12 +++++ ...c5802e9f3f4068fcecb6937b867b270d.asciidoc} | 2 +- .../c5e5873783246c7b1c01d8464fed72c4.asciidoc | 7 --- ...c64b61bedb21b9def8fce5092e677af9.asciidoc} | 7 ++- ...c67b0f00c2e690303c0e5af2f51e0fea.asciidoc} | 4 +- ...c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc} | 4 +- .../c87038b96ab06d9a741a130f94de4f02.asciidoc | 11 ++++ .../c9c396b94bb88098477e2b08b55a12ee.asciidoc | 42 +++++++++++++++ ...c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc} | 4 +- .../c9d9a1d751f20f6197c825cb4378fe9f.asciidoc | 11 ++++ ...caab99520d3fe41f6154d74a7f696057.asciidoc} | 4 +- .../cb01106bf524df5e0501d4c655c1aa7b.asciidoc | 14 ----- .../cb0c3223fd45148497df73adfba2e9ce.asciidoc | 15 ++++++ .../cd247f267968aa0927bfdad56852f8f5.asciidoc | 9 ---- ...cda045dfd79acd160ed8668f2ee17ea7.asciidoc} | 4 +- ...cdb68b3f565df7c85e52a55864b37d40.asciidoc} | 4 +- .../cdd7127681254f4d614cc075f9e6fbcf.asciidoc | 10 ++++ .../cde4dddae5c06e7f1d38c9d933dbc7ac.asciidoc | 7 --- ...cdf400299acd1c7b1b7bb42e284e3d08.asciidoc} | 2 +- .../cf02e3d8b371bd59f0224967c36330da.asciidoc | 7 --- .../cfbaea6f0df045c5d940bbb6a9c69cd8.asciidoc | 18 ------- .../cfc37446bd892d1ac42a3c8e8b204e6c.asciidoc | 7 --- .../d17269bb80fb63ec0bf37d219e003dcb.asciidoc | 23 -------- .../d1b3b7d2bb2ab90d15fd10318abd24db.asciidoc | 19 ------- .../d1bcf2eb63a462bfdcf01a68e68d5b4a.asciidoc | 17 ------ .../d1fde25de1980b7e84fa878289fd0bcb.asciidoc | 12 +++++ .../d2f52c106685bd8eab47e11d644d7a70.asciidoc | 37 +++++++++++++ .../d3016e4e8025362ad9a05ee86bb2061f.asciidoc | 9 ---- .../d3088d5fa59b3ab110f64fb4f9b0065c.asciidoc | 9 ---- ...d3dccdb15822e971ededb9f6f7d8ada1.asciidoc} | 2 +- .../d4b4cefba4318caeba7480187faf2b13.asciidoc | 9 ---- .../d50a3c64890f88af32c6d4ef4899d82a.asciidoc | 20 ------- ...d5533f08f5cc0479f07a46c761f0786b.asciidoc} | 4 +- .../d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc | 15 ++++++ .../d5dcddc6398b473b6ad9bce5c6adf986.asciidoc | 7 --- .../d718b63cf1b6591a1d59a0cf4fd995eb.asciidoc | 16 ------ ...d7f42d1b906dc406be1819d17c625d5f.asciidoc} | 3 +- ...d7fe687201ac87b307cd06ed015dd317.asciidoc} | 4 +- .../d87175daed2327565d4325528c6d8b38.asciidoc | 10 ++++ .../d8b115341da772a628a024e7d1644e73.asciidoc | 7 --- .../d8b2a88b5eca99d3691ad3cd40266736.asciidoc | 18 ------- .../d90a84a24a407731dfc1929ac8327746.asciidoc | 7 --- .../da3cecc36a7313385d32c7f52ccfb7e3.asciidoc | 19 +++++++ .../dbc50b8c934171e94604575a8b36f349.asciidoc | 10 ++++ ...ddf56782ecc7eaeb3115e150c4830013.asciidoc} | 6 +-- .../de139866a220124360e5e27d1a736ea4.asciidoc | 23 -------- .../de176bc4788ea286fff9e92418a43ea8.asciidoc | 20 ------- ...de876505acc75d371d1f6f484c449197.asciidoc} | 2 +- .../df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc | 53 +++++++++++++++++++ .../dfac8d098b50aa0181161bcd17b38ef4.asciidoc | 9 ---- .../dfb1fe96d806a644214d06f9b4b87878.asciidoc | 11 ---- ...dfcc83efefaddccfe5dce0695c2266ef.asciidoc} | 2 +- .../e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc | 26 +++++++++ .../e270f3f721a5712cd11a5ca03554f5b0.asciidoc | 2 +- .../e316271f668c9889bf548311fb421f1e.asciidoc | 19 +++++++ .../e39d51202913bf6d861e9e721570cdb8.asciidoc | 6 +++ .../e4be53736bcc02b03068fd72fdbfe271.asciidoc | 5 +- .../e567e6dbf86300142573c73789c8fce4.asciidoc | 9 ---- .../e58833449d01379df20ad06dc28144d8.asciidoc | 11 ++++ .../e5f50b31f165462d883ecbff45f74985.asciidoc | 23 -------- ...e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc} | 4 +- ...e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc} | 2 +- .../e63775a2ff22b945ab9d5f630b80c506.asciidoc | 10 ++++ ...e650d73c57ab313e686fec01e3b0c90f.asciidoc} | 9 ++-- ...e6b972611c0ec8ab4c240f33f323d85b.asciidoc} | 4 +- ...e7eca57a5bf5a53cbbe2463bce11495b.asciidoc} | 2 +- ...e821d27a8b810821707ba860e31f8b78.asciidoc} | 4 +- ...e84e23232c7ecc8d6377ec2c16a60269.asciidoc} | 6 +-- .../e891e1d4805172da45a81f62b6b44aca.asciidoc | 18 +++++++ ...e8cbe2269f3dff6b231e73119e81511d.asciidoc} | 4 +- .../e8e451bc8c45bcf16df43804c4fc8329.asciidoc | 17 ------ .../e9c2e15b36372d5281c879d336322b6c.asciidoc | 12 ----- .../e9f9e184499a793828233e536fac0487.asciidoc | 11 ++++ .../ea5391267ced860c00214c096e08c8d4.asciidoc | 10 ++++ ...eada8af6588584ac88f1e5b15f4a5c2a.asciidoc} | 2 +- ...eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc} | 2 +- ...ecc57597f6b791d1151ad79d9f4ce67b.asciidoc} | 2 +- ...edcfadbfb14d97a2f5e6e21ef7039818.asciidoc} | 0 .../ef0f4fa4272c47ff62fb7b422cf975e7.asciidoc | 12 ----- .../ef22234b97cc06d7dd620b4ce7c97b31.asciidoc | 13 +++++ .../ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc | 26 +++++++++ .../ef9111c1648d7820925f12e07d1346c5.asciidoc | 19 ------- ...eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc} | 0 .../f0e21e03a07c8fa0209b0aafdb3791e6.asciidoc | 14 ----- .../f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc | 2 +- .../f37173a75cd1b0d683c6f67819dd1de3.asciidoc | 10 ++++ ...f43d551aaaad73d979adf1b86533e6a3.asciidoc} | 2 +- ...f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc} | 7 +-- ...f495f9c99916a05e3b28166d31955fad.asciidoc} | 2 +- .../f4a1008b3f9baa67bb03ce9ef5ab4cb4.asciidoc | 10 ---- .../f4f557716049b23f8840d58d71e748f0.asciidoc | 10 ++++ ...f5815d573cee0447910c9668003887b8.asciidoc} | 2 +- .../f6b5032bf27c2445d28845be0d413970.asciidoc | 10 ---- .../f6d6889667f56b8f49d2858070571a6b.asciidoc | 20 ------- ...f8a0010753b1ff563dc42d703902d2fa.asciidoc} | 8 +-- .../f8cc4b331a19ff4df8e4a490f906ee69.asciidoc | 7 --- .../f9636d7ef1a45be4f36418c875cf6bef.asciidoc | 24 --------- .../f9c8245cc13770dff052b6759a749efa.asciidoc | 10 ++++ .../fa0f4485cd48f986b7ae8cbb24e331c4.asciidoc | 20 ------- .../fabe14480624a99e8ee42c7338672058.asciidoc | 7 ++- ...fad524db23eb5718ff310956e590b00d.asciidoc} | 0 .../fbcf5078a6a9e09790553804054c36b3.asciidoc | 7 --- .../fdcaba9547180439ff4b6275034a5170.asciidoc | 14 ----- .../fe5763d32955e8b65eb3048e97b1580c.asciidoc | 7 --- .../fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc | 22 ++++++++ .../fe806011466e7cdc1590da186297edb6.asciidoc | 9 ++++ .../feefeb68144002fd1fff57b77b95b85e.asciidoc | 13 ----- .../ff09e13391cecb2e8b9dd440b37e065f.asciidoc | 11 ++++ .../ff63ae39c34925dbfa54282ec9989124.asciidoc | 19 +++++++ utils/generate-examples.py | 2 +- utils/templates/example | 12 +++++ 450 files changed, 1938 insertions(+), 2430 deletions(-) delete mode 100644 docs/examples/014b788c879e4aaa1020672e45e25473.asciidoc create mode 100644 docs/examples/0163af36c8472ac0c5160c8b716f5b26.asciidoc rename docs/examples/{0bbd30b9be3e54ff3028b9f4459634d2.asciidoc => 0246f73cc2ed3dfec577119e8cd15404.asciidoc} (72%) delete mode 100644 docs/examples/025b54db0edc50c24ea48a2bd94366ad.asciidoc rename docs/examples/{98b121bf47cebd85671a2cb519688d28.asciidoc => 0264e994a7e68561e2ca6be0f0d90ee9.asciidoc} (86%) create mode 100644 docs/examples/0308cbd85281f95fc458042afe3f587d.asciidoc delete mode 100644 docs/examples/033778305d52746f5ce0a2a922c8e521.asciidoc delete mode 100644 docs/examples/048d8abd42d094bbdcf4452a58ccb35b.asciidoc delete mode 100644 docs/examples/04fe1e3a0047b0cdb10987b79fc3f3f3.asciidoc delete mode 100644 docs/examples/073539a7e38be3cdf13008330b6a536a.asciidoc rename docs/examples/{1bc731a4df952228af6dfa6b48627332.asciidoc => 07ba3eaa931f2cf110052e3544db51f8.asciidoc} (67%) rename docs/examples/{09ecba5814d71e4c44468575eada9878.asciidoc => 095d60b2cfc5004c97efc49f27287262.asciidoc} (83%) delete mode 100644 docs/examples/0989cc65d8924f666ce3eb0820d2d244.asciidoc delete mode 100644 docs/examples/09cdd5ae8114c49886026fef8d00a19c.asciidoc delete mode 100644 docs/examples/09dbd90c5e22ea4a17b4cf9aa72e08ae.asciidoc delete mode 100644 docs/examples/0ba0b2db24852abccb7c0fc1098d566e.asciidoc delete mode 100644 docs/examples/0be2c28ee65384774b1e479b47dc3d92.asciidoc delete mode 100644 docs/examples/0c4ad860a485fe53d8140ad3ccd11dcf.asciidoc create mode 100644 docs/examples/0c892d328b73d38396aaef6d9cbcd36b.asciidoc delete mode 100644 docs/examples/0cc991e3f7f8511a34730e154b3c5edc.asciidoc delete mode 100644 docs/examples/0ce3606f1dba490eef83c4317b315b62.asciidoc create mode 100644 docs/examples/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc create mode 100644 docs/examples/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc delete mode 100644 docs/examples/1027ab1ca767ac1428176ef4f84bfbcf.asciidoc create mode 100644 docs/examples/111c69ca94162c1523b799a5c14723dd.asciidoc rename docs/examples/{8eaf4d5dd4ab1335deefa7749fdbbcc3.asciidoc => 1153bd92ca18356db927054958cd95c6.asciidoc} (90%) delete mode 100644 docs/examples/1252fa45847edba5ec2b2f33da70ec5b.asciidoc create mode 100644 docs/examples/1259a9c151730e42de35bb2d1ba700c6.asciidoc create mode 100644 docs/examples/137709a0a0dc38d6094291c9fc75b804.asciidoc delete mode 100644 docs/examples/138ccd89f72aa7502dd9578403dcc589.asciidoc create mode 100644 docs/examples/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc create mode 100644 docs/examples/13d90ba227131aefbf4fcfd5992e662a.asciidoc delete mode 100644 docs/examples/14701dcc0cca9665fce2aace0cb62af7.asciidoc rename docs/examples/{be1bd47393646ac6bbee177d1cdb7738.asciidoc => 151d2b11807ec684b0c01aa89189a801.asciidoc} (86%) delete mode 100644 docs/examples/15dad5338065baaaa7d475abe85f4c22.asciidoc create mode 100644 docs/examples/178c920d5e8ec0071f77290fa059802c.asciidoc delete mode 100644 docs/examples/189a921df2f5b1fe580937210ce9c1c2.asciidoc delete mode 100644 docs/examples/1b542e3ea87a742f95641d64dcfb1bdb.asciidoc delete mode 100644 docs/examples/1b8655e6ba99fe39933c6eafe78728b7.asciidoc delete mode 100644 docs/examples/1b8caf0a6741126c6d0ad83b56fce290.asciidoc create mode 100644 docs/examples/1cab9da122778a95061831265c250cc1.asciidoc delete mode 100644 docs/examples/1d65cb6d055c46a1bde809687d835b71.asciidoc delete mode 100644 docs/examples/1da77e114459e0b77d78a3dcc8fae429.asciidoc delete mode 100644 docs/examples/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc delete mode 100644 docs/examples/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc delete mode 100644 docs/examples/1e49eba5b9042c1900a608fe5105ba43.asciidoc delete mode 100644 docs/examples/1e50d993bd6517e6c381e82d09f0389e.asciidoc rename docs/examples/{dc15e2373e5ecbe09b4ea0858eb63d47.asciidoc => 1e871f060dbe1a5c316ed205278804a8.asciidoc} (92%) delete mode 100644 docs/examples/1f336ecc62480c1d56351cc2f82d0d08.asciidoc rename docs/examples/{3e573bfabe00f8bfb8bb69aa5820768e.asciidoc => 1f673e1a0de2970dc648618d5425a994.asciidoc} (57%) rename docs/examples/{6138d6919f3cbaaf61e1092f817d295c.asciidoc => 20005d8a6555b259b299d862cd218701.asciidoc} (100%) delete mode 100644 docs/examples/210cf5c76bff517f48e80fa1c2d63907.asciidoc delete mode 100644 docs/examples/213ab768f1b6a895e09403a0880e259a.asciidoc create mode 100644 docs/examples/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc delete mode 100644 docs/examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc delete mode 100644 docs/examples/231aa0bb39c35fe199d28fe0e4a62b2e.asciidoc delete mode 100644 docs/examples/23ab0f1023b1b2cd5cdf2a8f9ccfd57b.asciidoc rename docs/examples/{36b2778f23d0955255f52c075c4d213d.asciidoc => 242a26ced0e5706e48dcda19a4003094.asciidoc} (73%) delete mode 100644 docs/examples/2468ab381257d759d8a88af1141f6f9c.asciidoc delete mode 100644 docs/examples/251ea12c1248385ab409906ac64d9ee9.asciidoc rename docs/examples/{6f21a878fee3b43c5332b81aaddbeac7.asciidoc => 25576b6773322f0929d4c635a940dba0.asciidoc} (88%) rename docs/examples/{69a7be47f85138b10437113ab2f0d72d.asciidoc => 25a0dad6547d432f5a3d394528f1c138.asciidoc} (70%) delete mode 100644 docs/examples/2891aa10ee9d474780adf94d5607f2db.asciidoc rename docs/examples/{618d5f3d35921d8cb7e9ccfbe9a4c3e3.asciidoc => 28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc} (83%) create mode 100644 docs/examples/2932e6f71e247cf52e11d2f38f114ddf.asciidoc create mode 100644 docs/examples/2a247e36a86a373bcbf478ac9a588f44.asciidoc rename docs/examples/{ad6ea0c1e46712aa1fd6d3bfa0ec979e.asciidoc => 2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc} (85%) create mode 100644 docs/examples/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc create mode 100644 docs/examples/2d01a9e5550b525496757f1bd7f0e706.asciidoc rename docs/examples/{72231b7debac60c95b9869a97dafda3a.asciidoc => 2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc} (100%) rename docs/examples/{804a97ff4d0613e6568e4efb19c52021.asciidoc => 2fa45d74ba9933188c4728f8a9e5372c.asciidoc} (76%) delete mode 100644 docs/examples/2fd69fb0538e4f36ac69a8b8f8bf5ae8.asciidoc rename docs/examples/{0ac9916f47a2483b89c1416684af322a.asciidoc => 2fea3e324939cc7e9c396964aeee7111.asciidoc} (100%) create mode 100644 docs/examples/30f3e3b9df46afd12e68bc71f18483b4.asciidoc delete mode 100644 docs/examples/311c4b632a29b9ead63b02d01f10096b.asciidoc rename docs/examples/{39a6a038c4b551022afe83de0523634e.asciidoc => 316cd43feb3b86396483903af1a048b1.asciidoc} (85%) create mode 100644 docs/examples/344b4144244d57f87c6aa4652b100b25.asciidoc create mode 100644 docs/examples/3544f17cb97b613a2f733707c676f759.asciidoc create mode 100644 docs/examples/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc create mode 100644 docs/examples/36063ff9a318dba7bb0be3a230655dc8.asciidoc delete mode 100644 docs/examples/3653567181f43a5f64c74f934aa821c2.asciidoc delete mode 100644 docs/examples/36818c6d9f434d387819c30bd9addb14.asciidoc delete mode 100644 docs/examples/3722cb3705b6bc7f486969deace3dd83.asciidoc rename docs/examples/{cd5bc5bf7cd58d7b1492c9c298b345f6.asciidoc => 37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc} (88%) rename docs/examples/{9e56d79ad9a02b642c361f0b85dd95d7.asciidoc => 378e55f78fa13578a1302bae8d479765.asciidoc} (67%) delete mode 100644 docs/examples/381fced1882ca8337143e6bb180a5715.asciidoc delete mode 100644 docs/examples/38c1d0f6668e9563c0827f839f9fa505.asciidoc create mode 100644 docs/examples/39ce44333d28ed2b833722d3e3cb06f3.asciidoc delete mode 100644 docs/examples/3a700f836d8d5da1b656a876554028aa.asciidoc delete mode 100644 docs/examples/3ae03ba3b56e5e287953094050766738.asciidoc create mode 100644 docs/examples/3b8ab7027e0d616fb432acd8813e086c.asciidoc rename docs/examples/{1216f8f7367df3aa823012cef310c08a.asciidoc => 3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc} (58%) rename docs/examples/{75330ec1305d2beb0e2f34d2195464e2.asciidoc => 3d1a0e1dc5310544d032108ae0b3f099.asciidoc} (51%) delete mode 100644 docs/examples/3d1ff6097e2359f927c88c2ccdb36252.asciidoc create mode 100644 docs/examples/3db2b5a6424aa92ecab7a8640c38685a.asciidoc delete mode 100644 docs/examples/3f3b3e207f79303ce6f86e03e928e062.asciidoc rename docs/examples/{e17e8852ec3f31781e1364f4dffeb6d0.asciidoc => 3faf5e2873de340acfe0a617017db784.asciidoc} (84%) create mode 100644 docs/examples/4113c57384aa37c58d11579e20c00760.asciidoc rename docs/examples/{7f465b7e8ed42df6c42251b4481e699e.asciidoc => 41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc} (90%) rename docs/examples/{015294a400986295039e52ebc62033be.asciidoc => 41dbd79f624b998d01c10921e9a35c4b.asciidoc} (84%) delete mode 100644 docs/examples/42744a175125df5be0ef77413bf8f608.asciidoc delete mode 100644 docs/examples/427f6b5c5376cbf0f71f242a60ca3d9e.asciidoc rename docs/examples/{0a958e486ede3f519d48431ab689eded.asciidoc => 436d50b85fc8f0977d02059eec00719b.asciidoc} (91%) create mode 100644 docs/examples/44da736ce0e1587c1e7c45eee606ead7.asciidoc delete mode 100644 docs/examples/4646764bf09911fee7d58630c72d3137.asciidoc delete mode 100644 docs/examples/46658f00edc4865dfe472a392374cd0f.asciidoc rename docs/examples/{60ee33f3acfdd0fe6f288ac77312c780.asciidoc => 472ec8c57fec8457e31fe6dd7f6e3713.asciidoc} (86%) delete mode 100644 docs/examples/47b5ff897f26e9c943cee5c06034181d.asciidoc delete mode 100644 docs/examples/47bb632c6091ad0cd94bc660bdd309a5.asciidoc create mode 100644 docs/examples/4824a823a830a2a5d990eacfd783ac22.asciidoc create mode 100644 docs/examples/4955bae30f265b9e436f82b015de6d7e.asciidoc rename docs/examples/{fc8097bdfb6f3a4017bf4186ccca8a84.asciidoc => 4a2080ae55d931eb0643cc3eb91ec524.asciidoc} (73%) delete mode 100644 docs/examples/4acf902c2598b2558f34f20c1744c433.asciidoc rename docs/examples/{c4b278ba293abd0d02a0b5ad1a99f84a.asciidoc => 4b1044259a6d777d87529eae25675005.asciidoc} (64%) delete mode 100644 docs/examples/4b90feb9d5d3dbfce424dac0341320b7.asciidoc rename docs/examples/{028f6d6ac2594e20b78b8a8f8cbad49d.asciidoc => 4ba86373e13e106de044f190343be328.asciidoc} (93%) create mode 100644 docs/examples/4bc744b0f33b322741a8caf6d8d7d765.asciidoc rename docs/examples/{e0d6e02b998bdea99c9c08dcc3630c5e.asciidoc => 4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc} (100%) rename docs/examples/{ec27afee074001b0e4e393611010842b.asciidoc => 4f3366fc26e7ea4de446dfa5cdec9683.asciidoc} (92%) delete mode 100644 docs/examples/506844befdc5691d835771bcbb1c1a60.asciidoc create mode 100644 docs/examples/50b5c0332949d2154c72b629b5fa6222.asciidoc rename docs/examples/{aa6bfe54e2436eb668091fe31c2fbf4d.asciidoc => 51b40610ae05730b4c6afd25647d7ae0.asciidoc} (78%) create mode 100644 docs/examples/5203560189ccab7122c03500147701ef.asciidoc delete mode 100644 docs/examples/52a87b81e4e0b6b11e23e85db1602a63.asciidoc delete mode 100644 docs/examples/52b2bfbdd78f8283b6f4891c48013237.asciidoc rename docs/examples/{a71c438cc4df1cafe3109ccff475afdb.asciidoc => 52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc} (84%) rename docs/examples/{c32a3f8071d87f0a3f5a78e07fe7a669.asciidoc => 5330191ec9f11281ebf6867bf11c58ae.asciidoc} (68%) delete mode 100644 docs/examples/53d938c754f36a912fcbe6473abb463f.asciidoc rename docs/examples/{93f1bdd72e79827dcf9a34efa02fd977.asciidoc => 54a215d242ab65123b09e9dfb71bcbbf.asciidoc} (80%) delete mode 100644 docs/examples/54a770f053f3225ea0d1e34334232411.asciidoc rename docs/examples/{b214942b938e47f2c486e523546cb574.asciidoc => 5553cf7a02c22f616cd994747f2dd5a5.asciidoc} (92%) create mode 100644 docs/examples/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc rename docs/examples/{3cd50a789b8e1f0ebbbc53a8d7ecf656.asciidoc => 56a903530990313b753b1be33578997a.asciidoc} (88%) delete mode 100644 docs/examples/5925c23a173a63bdb30b458248d1df76.asciidoc create mode 100644 docs/examples/5b58007f10700ec7934580f034404652.asciidoc create mode 100644 docs/examples/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc delete mode 100644 docs/examples/5be23858b35043fcb7b50fe36b873e6e.asciidoc rename docs/examples/{df17f920b0deab3529b98df88b781f55.asciidoc => 5c6fbeac20dc23b613847f35d431ecab.asciidoc} (100%) rename docs/examples/{6799d132c1c7ca3970763acde2337ef9.asciidoc => 5d03bb385904d20c5323885706738459.asciidoc} (55%) delete mode 100644 docs/examples/5d32279dcd52b22d9e1178a02a3ad957.asciidoc rename docs/examples/{43af86de5e49aa06070092fffc138208.asciidoc => 5dfe24287bb930ad33345caf092a004b.asciidoc} (52%) delete mode 100644 docs/examples/5eabcdbf61bfcb484dc694f25c2bba36.asciidoc rename docs/examples/{1f6fe6833686e38c3711c6f2aa00a078.asciidoc => 5f1ed9cfdc149763b444acfbe10b0e16.asciidoc} (77%) delete mode 100644 docs/examples/5f210f74725ea0c9265190346edfa246.asciidoc delete mode 100644 docs/examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc delete mode 100644 docs/examples/609260ad1d5998be2ca09ff1fe237efa.asciidoc rename docs/examples/{1c23507edd7a3c18538b68223378e4ab.asciidoc => 60f889fbed5df3185444f7015b48ed76.asciidoc} (55%) delete mode 100644 docs/examples/621665fdbd7fc103c09bfeed28b67b1a.asciidoc delete mode 100644 docs/examples/625dc94df1f9affb49a082fd99d41620.asciidoc create mode 100644 docs/examples/633c8a9fc57268979d8735c557705809.asciidoc rename docs/examples/{e5d2172b524332196cac0f031c043659.asciidoc => 63cc960215ae83b359c12df3c0993bfa.asciidoc} (74%) create mode 100644 docs/examples/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc rename docs/examples/{6be70810d6ebd6f09d8a49f9df847765.asciidoc => 641f75862c70e25e79d249d9e0a79f03.asciidoc} (94%) delete mode 100644 docs/examples/645136747d37368a14ab34de8bd046c6.asciidoc delete mode 100644 docs/examples/645796e8047967ca4a7635a22a876f4c.asciidoc delete mode 100644 docs/examples/6464124d1677f4552ddddd95a340ca3a.asciidoc rename docs/examples/{67ceac4bf2d9ac7cc500390544cdcb41.asciidoc => 64aff98cf477555e7411714c17006572.asciidoc} (50%) rename docs/examples/{7f28f8ae8fcdbd807dadde0b5b007a6d.asciidoc => 653c0d0ef146c997ef6bc6450d4f5f94.asciidoc} (85%) delete mode 100644 docs/examples/67bba546d835bca8f31df13e3587c348.asciidoc create mode 100644 docs/examples/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc create mode 100644 docs/examples/69c07cfdf8054c301cd6186c5d71aa02.asciidoc delete mode 100644 docs/examples/6a81d00f0d73bc5985e76b3cadab645e.asciidoc rename docs/examples/{5271f4ff29bb48838396e5a674664ee0.asciidoc => 6aa2941855d13f365f70aa8767ecb137.asciidoc} (70%) rename docs/examples/{5043b83a89091fa00edb341ddf7ba370.asciidoc => 6b0288acb739c4667d41339e5100c327.asciidoc} (100%) create mode 100644 docs/examples/6b1e837a8469eca2d03d5c36f5910f34.asciidoc rename docs/examples/{a116949e446f34dc25ae57d4b703d0c1.asciidoc => 6b77795e9249c8d9865f7a49fd86a863.asciidoc} (100%) rename docs/examples/{ec473de07fe89bcbac1f8e278617fe46.asciidoc => 6c00dae1a456ae5e854e98e895dca2ab.asciidoc} (84%) rename docs/examples/{54092c8c646133f5dbbc047990dd458d.asciidoc => 6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc} (94%) rename docs/examples/{b919f88e6f47a40d5793479440a90ba6.asciidoc => 6cd083045bf06e80b83889a939a18451.asciidoc} (92%) delete mode 100644 docs/examples/6d1e75312a28a5ba23837abf768f2510.asciidoc rename docs/examples/{81c9aa2678d6166a9662ddf2c011a6a5.asciidoc => 6e000496a1fa8b57148518eaad692f35.asciidoc} (55%) delete mode 100644 docs/examples/6f097c298a7abf4c032c4314920c49c8.asciidoc delete mode 100644 docs/examples/6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc delete mode 100644 docs/examples/710c7871f20f176d51209b1574b0d61b.asciidoc rename docs/examples/{0bd3923424a20a4ba860b0774b9991b1.asciidoc => 711443504b69d0d296e717c716a223e2.asciidoc} (96%) delete mode 100644 docs/examples/71ba9033107882f61cdc3b32fc73568d.asciidoc delete mode 100644 docs/examples/72beebe779a258c225dee7b023e60c52.asciidoc create mode 100644 docs/examples/73be1f93d789264e5b972ddb5991bc66.asciidoc delete mode 100644 docs/examples/745f9b8cdb8e91073f6e520e1d9f8c05.asciidoc create mode 100644 docs/examples/746e0a1cb5984f2672963b363505c7b3.asciidoc delete mode 100644 docs/examples/7477671958734843dd67cf0b8e6c7515.asciidoc create mode 100644 docs/examples/74a80c28737a0648db0dfe7f049d12f2.asciidoc delete mode 100644 docs/examples/764f9884b370cbdc82a1c5c42ed40ff3.asciidoc create mode 100644 docs/examples/77113c65e1755313183a8969233a5a07.asciidoc delete mode 100644 docs/examples/77243bbf92f2a55e0fca6c2a349a1c15.asciidoc create mode 100644 docs/examples/7841b65a3bb880ed66cec453925a50cf.asciidoc create mode 100644 docs/examples/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc rename docs/examples/{7cac05cb589f1614fd5b8589153bef06.asciidoc => 7b5c231526846f2f7b98d78f3656ae6a.asciidoc} (84%) create mode 100644 docs/examples/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc rename docs/examples/{f085fb032dae56a3b104ab874eaea2ad.asciidoc => 7ca224d1a7de20a15c008e1b9dbda377.asciidoc} (74%) create mode 100644 docs/examples/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc delete mode 100644 docs/examples/7cf71671859be7c1ecf673396db377cd.asciidoc create mode 100644 docs/examples/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc delete mode 100644 docs/examples/7e52bec09624cf6c0de5d13f2bfad5a5.asciidoc rename docs/examples/{8baccd8688a6bad1749b8935f9601ea4.asciidoc => 7fef68840761c6982c14ad7af96caf37.asciidoc} (90%) rename docs/examples/{2a1de18774f9c68cafa169847832b2bc.asciidoc => 803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc} (68%) rename docs/examples/{e2a042c629429855c3bcaefffb26b7fa.asciidoc => 85479e02af00681210e17e3d0ff51e21.asciidoc} (83%) delete mode 100644 docs/examples/8653e76676de5d327201b77512afa3a0.asciidoc create mode 100644 docs/examples/87416e6a1ca2da324dbed6deb05303eb.asciidoc delete mode 100644 docs/examples/899eef71a67a1b2aa11a2166ec7f48f1.asciidoc delete mode 100644 docs/examples/89a8ac1509936acc272fc2d72907bc45.asciidoc rename docs/examples/{ac544eb247a29ca42aab13826ca88561.asciidoc => 8a1f6cffa653800282c0ae160ee375bc.asciidoc} (92%) delete mode 100644 docs/examples/8acc1d67b152e7027e0f0e1a8b4b2431.asciidoc delete mode 100644 docs/examples/8c5977410335d58217e0626618ce6641.asciidoc create mode 100644 docs/examples/8c8b5224befab7804461c7e7b6086d9a.asciidoc create mode 100644 docs/examples/8c9081dc738d1290fd76071b283fcaec.asciidoc delete mode 100644 docs/examples/8d9a63d7c31f08bd27d92ece3de1649c.asciidoc create mode 100644 docs/examples/8e286a205a1f84f888a6d99f2620c80e.asciidoc delete mode 100644 docs/examples/8e6bfb4441ffa15c86d5dc20fa083571.asciidoc rename docs/examples/{71b5b2ba9557d0f296ff2de91727d2f6.asciidoc => 8eac28d2e9b6482b413d61817456a14f.asciidoc} (88%) rename docs/examples/{a2a25aad1fea9a541b52ac613c78fb64.asciidoc => 8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc} (86%) rename docs/examples/{9a8995fd31351045d99c78e40444c8ea.asciidoc => 8ee9521f57661a050efb614f02b4a090.asciidoc} (70%) delete mode 100644 docs/examples/8f0511f8a5cb176ff2afdd4311799a33.asciidoc rename docs/examples/{774d715155cd13713e6e327adf6ce328.asciidoc => 8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc} (77%) delete mode 100644 docs/examples/9166cf38427d5cde5d2ec12a2012b669.asciidoc rename docs/examples/{1577e6e806b3283c9e99f1596d310754.asciidoc => 926c0134aeaad53bd0f3bdad9c430217.asciidoc} (70%) rename docs/examples/{dfef545b1e2c247bafd1347e8e807ac1.asciidoc => 934aa38c3adcc4cf74ea40cd8736876c.asciidoc} (85%) rename docs/examples/{0afaf1cad692e6201aa574c8feb6e622.asciidoc => 9403764e6eccad7b321b65e9a10c5727.asciidoc} (85%) create mode 100644 docs/examples/946522c26d02bebf5c527ba28e55c724.asciidoc rename docs/examples/{83f95657beca9bf5d8264c80c7fb463f.asciidoc => 9467e52087a13b63b02d78c35ff6f798.asciidoc} (100%) rename docs/examples/{f2d68493abd3ca430bd03a7f7f8d18f9.asciidoc => 957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc} (84%) create mode 100644 docs/examples/95b3f53f2065737bbeba6199e8a12df3.asciidoc delete mode 100644 docs/examples/978088f989d45dd09339582e9cbc60e0.asciidoc delete mode 100644 docs/examples/979d25dff2d8987119410291ad47b0d1.asciidoc delete mode 100644 docs/examples/98234499cfec70487cec5d013e976a84.asciidoc rename docs/examples/{b68c85fe1b0d2f264dc0d1cbf530f319.asciidoc => 996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc} (95%) delete mode 100644 docs/examples/99a52be903945b17e734a1d02a57e958.asciidoc rename docs/examples/{70f0aa5853697e265ef3b1df72940951.asciidoc => 9a02bd47c000a3d9a8911233c37c890f.asciidoc} (77%) rename docs/examples/{58df61acbfb15b8ef0aaa18b81ae98a6.asciidoc => 9bae72e974bdeb56007d9104e73eff92.asciidoc} (84%) rename docs/examples/{8a355eb25d2a01ba62dc1a22dd46f46f.asciidoc => 9bfdda207b701028a3439e495e800c02.asciidoc} (85%) create mode 100644 docs/examples/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc rename docs/examples/{46c4b0dfb674825f9579203d41e7f404.asciidoc => 9f04cc1a0c6cdb3ed2247f1399713767.asciidoc} (68%) rename docs/examples/{e21e1c26dc8687e7bf7bd2bf019a6698.asciidoc => a0c868282c0514a342ad04998cdc2175.asciidoc} (67%) create mode 100644 docs/examples/a0f4e902d18460337684d74ea932fbe9.asciidoc delete mode 100644 docs/examples/a1db5c822745fe167e9ef854dca3d129.asciidoc create mode 100644 docs/examples/a2b2ce031120dac49b5120b26eea8758.asciidoc create mode 100644 docs/examples/a3e79d6c626a490341c5b731acbb4a5d.asciidoc delete mode 100644 docs/examples/a49169b4622918992411fab4ec48191b.asciidoc delete mode 100644 docs/examples/a4a396cd07657b3977713fb3a742c41b.asciidoc delete mode 100644 docs/examples/a5a7050fb9dcb9574e081957ade28617.asciidoc rename docs/examples/{c849c6c8f8659dbb93e1c14356f74e37.asciidoc => a5f9eb40087921e67d820775acf71522.asciidoc} (67%) rename docs/examples/{d9474f66970c6955e24b17c7447e7b5f.asciidoc => a692b4c0ca7825c467880b346841f5a5.asciidoc} (78%) create mode 100644 docs/examples/a6bb306ca250cf651f19cae808b97012.asciidoc delete mode 100644 docs/examples/a6f8636b03cc5f677b7d89e750328612.asciidoc create mode 100644 docs/examples/a6fdd0100cd362df54af6c95d1055c96.asciidoc rename docs/examples/{afc29b61c532cf683f749baf013e7bfe.asciidoc => a72613de3774571ba24def4b495161b5.asciidoc} (75%) create mode 100644 docs/examples/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc delete mode 100644 docs/examples/a7c15fe6b5779c84ce9a34bf4b2a7ab7.asciidoc create mode 100644 docs/examples/a84ffbaa4ffa68b22f6fe42d3b4f8dd5.asciidoc delete mode 100644 docs/examples/a8fba09a46b2c3524428aa3259b7124f.asciidoc rename docs/examples/{b9c5d7ca6ca9c6f747201f45337a4abf.asciidoc => a9fe70387d9c96a07830e1859c57efbb.asciidoc} (68%) create mode 100644 docs/examples/aaa7a61b07861235fb6e489b946c705c.asciidoc create mode 100644 docs/examples/ab8b4537fad80107bc88f633d4039a52.asciidoc delete mode 100644 docs/examples/abf329ebefaf58acd4ee30e685731499.asciidoc rename docs/examples/{fa2fe60f570bd930d2891778c6efbfe6.asciidoc => ac497917ef707538198a8458ae3d5c6b.asciidoc} (100%) rename docs/examples/{ebb6b59fbc9325c17e45f524602d6be2.asciidoc => ac73895ca1882cd1ac65b1facfbb5c63.asciidoc} (56%) rename docs/examples/{db6cba451ba562abe953d09ad80cc15c.asciidoc => acc6cd860032167e34fa5e0c043ab3b0.asciidoc} (80%) rename docs/examples/{fdd38f0d248385a444c777e7acd97846.asciidoc => ad2416ca0581316cee6c63129685bca5.asciidoc} (86%) create mode 100644 docs/examples/ad3b159657d4bcb373623fdc61acc3bf.asciidoc delete mode 100644 docs/examples/ad79228630684d950fe9792a768d24c5.asciidoc delete mode 100644 docs/examples/ae9b5fbd42af2386ffbf56ad4a697e51.asciidoc delete mode 100644 docs/examples/af3fb9fa5691a7b37a6dc2a69ff66e64.asciidoc rename docs/examples/{b789292f9cf63ce912e058c46d90ce20.asciidoc => af44cc7fb0c435d4497c77baf904bf5e.asciidoc} (84%) delete mode 100644 docs/examples/b0d64d0a554549e5b2808002a0725493.asciidoc delete mode 100644 docs/examples/b0ec418bf416c62bed602b0a32a6d5f5.asciidoc create mode 100644 docs/examples/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc rename docs/examples/{d31062ff8c015387889fed4ad86fd914.asciidoc => b10668cc742e666fe0eb6a53fd38a93e.asciidoc} (91%) create mode 100644 docs/examples/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc rename docs/examples/{96de5703ba0bd43fd4ac239ec5408542.asciidoc => b3a711c3deddcdb8a3f6623184a8b794.asciidoc} (90%) delete mode 100644 docs/examples/b41dce56b0e640d32b1cf452f87cec17.asciidoc delete mode 100644 docs/examples/b4392116f2cc57ce8064ccbad30318d5.asciidoc create mode 100644 docs/examples/b515427f8685ca7d79176def672d19fa.asciidoc create mode 100644 docs/examples/b58b17975bbce307b2ccce5051a449e8.asciidoc delete mode 100644 docs/examples/b5f95bc097a201b29c7200fc8d3d31c1.asciidoc rename docs/examples/{527324766814561b75aaee853ede49a7.asciidoc => b6c872d04eabb39d1947cde6b29d4ae1.asciidoc} (74%) create mode 100644 docs/examples/b7a9f60b3646efe3834ca8381f8aa560.asciidoc delete mode 100644 docs/examples/b918d6b798da673a33e49b94f61dcdc0.asciidoc rename docs/examples/{28aad2c5942bfb221c2bf1bbdc01658e.asciidoc => b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc} (84%) delete mode 100644 docs/examples/b94cee0f74f57742b3948f9b784dfdd4.asciidoc delete mode 100644 docs/examples/b997885974522ef439d5e345924cc5ba.asciidoc delete mode 100644 docs/examples/b9a153725b28fdd0a5aabd7f17a8c2d7.asciidoc create mode 100644 docs/examples/ba59a3b9a0a2694704b2bf9c6ad4a8cf.asciidoc delete mode 100644 docs/examples/bb143628fd04070683eeeadc9406d9cc.asciidoc delete mode 100644 docs/examples/bc1ad5cc6d3eab98e3ce01f209ba7094.asciidoc create mode 100644 docs/examples/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc rename docs/examples/{ea02de2dbe05091fcb0dac72c8ba5f83.asciidoc => be5b415d7f33d6f0397ac2f8b5c10521.asciidoc} (72%) create mode 100644 docs/examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc delete mode 100644 docs/examples/be8f28f31207b173de61be032fcf239c.asciidoc rename docs/examples/{6bf63f2ec6ba55fcaf1092f48212bf25.asciidoc => beb0b9ff4f68672273fcff1b7bae706b.asciidoc} (74%) delete mode 100644 docs/examples/bfcd65ab85d684d36a8550080032958d.asciidoc create mode 100644 docs/examples/c06b96352e15f0161705fee0b5925776.asciidoc rename docs/examples/{d0a8a938a2fa913b6fdbc871079a59dd.asciidoc => c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc} (56%) rename docs/examples/{ba0b4081c98f3387f76b77847c52ee9a.asciidoc => c0ebaa33e750b87555dc352073f692e8.asciidoc} (58%) rename docs/examples/{d222c6a6ec7a3beca6c97011b0874512.asciidoc => c0ff8b3db994c4736f7579dde18097d2.asciidoc} (72%) rename docs/examples/{cdedd5f33f7e5f7acde561e97bff61de.asciidoc => c1a895497066a3dac674d4b1a119048d.asciidoc} (69%) delete mode 100644 docs/examples/c22b72c4a52ee098331b3f252c22860d.asciidoc delete mode 100644 docs/examples/c2c21e2824fbf6b7198ede30419da82b.asciidoc delete mode 100644 docs/examples/c48264ec5d9b9679fddd72e5c44425b9.asciidoc create mode 100644 docs/examples/c526fca1609b4c3c1d12dfd218d69a50.asciidoc rename docs/examples/{6a4679531e64c492fce16dc12de6dcb0.asciidoc => c5802e9f3f4068fcecb6937b867b270d.asciidoc} (80%) delete mode 100644 docs/examples/c5e5873783246c7b1c01d8464fed72c4.asciidoc rename docs/examples/{2533e4b36ae837eaecda08407ecb6383.asciidoc => c64b61bedb21b9def8fce5092e677af9.asciidoc} (61%) rename docs/examples/{626f8c4b3e2cd3d9beaa63a7f5799d7a.asciidoc => c67b0f00c2e690303c0e5af2f51e0fea.asciidoc} (84%) rename docs/examples/{bd5918ab903c0889bb1f09c8c2466e43.asciidoc => c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc} (68%) create mode 100644 docs/examples/c87038b96ab06d9a741a130f94de4f02.asciidoc create mode 100644 docs/examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc rename docs/examples/{98aeb275f829b5f7b8eb2147701565ff.asciidoc => c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc} (77%) create mode 100644 docs/examples/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc rename docs/examples/{98f14fddddea54a7d6149ab7b92e099d.asciidoc => caab99520d3fe41f6154d74a7f696057.asciidoc} (55%) delete mode 100644 docs/examples/cb01106bf524df5e0501d4c655c1aa7b.asciidoc create mode 100644 docs/examples/cb0c3223fd45148497df73adfba2e9ce.asciidoc delete mode 100644 docs/examples/cd247f267968aa0927bfdad56852f8f5.asciidoc rename docs/examples/{a80f5db4357bb25b8704d374c18318ed.asciidoc => cda045dfd79acd160ed8668f2ee17ea7.asciidoc} (69%) rename docs/examples/{734c2e2a1e45b84f1e4e65b51356fcd7.asciidoc => cdb68b3f565df7c85e52a55864b37d40.asciidoc} (67%) create mode 100644 docs/examples/cdd7127681254f4d614cc075f9e6fbcf.asciidoc delete mode 100644 docs/examples/cde4dddae5c06e7f1d38c9d933dbc7ac.asciidoc rename docs/examples/{4cd246e5c4c035a2cd4081ae9a3d54e5.asciidoc => cdf400299acd1c7b1b7bb42e284e3d08.asciidoc} (90%) delete mode 100644 docs/examples/cf02e3d8b371bd59f0224967c36330da.asciidoc delete mode 100644 docs/examples/cfbaea6f0df045c5d940bbb6a9c69cd8.asciidoc delete mode 100644 docs/examples/cfc37446bd892d1ac42a3c8e8b204e6c.asciidoc delete mode 100644 docs/examples/d17269bb80fb63ec0bf37d219e003dcb.asciidoc delete mode 100644 docs/examples/d1b3b7d2bb2ab90d15fd10318abd24db.asciidoc delete mode 100644 docs/examples/d1bcf2eb63a462bfdcf01a68e68d5b4a.asciidoc create mode 100644 docs/examples/d1fde25de1980b7e84fa878289fd0bcb.asciidoc create mode 100644 docs/examples/d2f52c106685bd8eab47e11d644d7a70.asciidoc delete mode 100644 docs/examples/d3016e4e8025362ad9a05ee86bb2061f.asciidoc delete mode 100644 docs/examples/d3088d5fa59b3ab110f64fb4f9b0065c.asciidoc rename docs/examples/{58b5003c0a53a39bf509aa3797aad471.asciidoc => d3dccdb15822e971ededb9f6f7d8ada1.asciidoc} (85%) delete mode 100644 docs/examples/d4b4cefba4318caeba7480187faf2b13.asciidoc delete mode 100644 docs/examples/d50a3c64890f88af32c6d4ef4899d82a.asciidoc rename docs/examples/{913770050ebbf3b9b549a899bc11060a.asciidoc => d5533f08f5cc0479f07a46c761f0786b.asciidoc} (84%) create mode 100644 docs/examples/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc delete mode 100644 docs/examples/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc delete mode 100644 docs/examples/d718b63cf1b6591a1d59a0cf4fd995eb.asciidoc rename docs/examples/{b93ed4ef309819734f0eeea82e8b0f1f.asciidoc => d7f42d1b906dc406be1819d17c625d5f.asciidoc} (78%) rename docs/examples/{17de0020b228df961ad3c6b06233c948.asciidoc => d7fe687201ac87b307cd06ed015dd317.asciidoc} (72%) create mode 100644 docs/examples/d87175daed2327565d4325528c6d8b38.asciidoc delete mode 100644 docs/examples/d8b115341da772a628a024e7d1644e73.asciidoc delete mode 100644 docs/examples/d8b2a88b5eca99d3691ad3cd40266736.asciidoc delete mode 100644 docs/examples/d90a84a24a407731dfc1929ac8327746.asciidoc create mode 100644 docs/examples/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc create mode 100644 docs/examples/dbc50b8c934171e94604575a8b36f349.asciidoc rename docs/examples/{0d664883151008b1051ef2c9ab2d0373.asciidoc => ddf56782ecc7eaeb3115e150c4830013.asciidoc} (78%) delete mode 100644 docs/examples/de139866a220124360e5e27d1a736ea4.asciidoc delete mode 100644 docs/examples/de176bc4788ea286fff9e92418a43ea8.asciidoc rename docs/examples/{4d46dbb96125b27f46299547de9d8709.asciidoc => de876505acc75d371d1f6f484c449197.asciidoc} (80%) create mode 100644 docs/examples/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc delete mode 100644 docs/examples/dfac8d098b50aa0181161bcd17b38ef4.asciidoc delete mode 100644 docs/examples/dfb1fe96d806a644214d06f9b4b87878.asciidoc rename docs/examples/{c612d93e7f682a0d731e385edf9f5d56.asciidoc => dfcc83efefaddccfe5dce0695c2266ef.asciidoc} (85%) create mode 100644 docs/examples/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc create mode 100644 docs/examples/e316271f668c9889bf548311fb421f1e.asciidoc create mode 100644 docs/examples/e39d51202913bf6d861e9e721570cdb8.asciidoc delete mode 100644 docs/examples/e567e6dbf86300142573c73789c8fce4.asciidoc create mode 100644 docs/examples/e58833449d01379df20ad06dc28144d8.asciidoc delete mode 100644 docs/examples/e5f50b31f165462d883ecbff45f74985.asciidoc rename docs/examples/{8fdf2344c4fb3de6902ad7c5735270df.asciidoc => e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc} (71%) rename docs/examples/{35e8da9410b8432cf4095f2541ad7b1d.asciidoc => e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc} (85%) create mode 100644 docs/examples/e63775a2ff22b945ab9d5f630b80c506.asciidoc rename docs/examples/{8871b8fcb6de4f0c7dff22798fb10fb7.asciidoc => e650d73c57ab313e686fec01e3b0c90f.asciidoc} (56%) rename docs/examples/{8de3206f80e18185a5ad6481f4c2ee07.asciidoc => e6b972611c0ec8ab4c240f33f323d85b.asciidoc} (79%) rename docs/examples/{5dd695679b5141d9142d3d30ba8d300a.asciidoc => e7eca57a5bf5a53cbbe2463bce11495b.asciidoc} (74%) rename docs/examples/{5f3a3eefeefe6fa85ec49d499212d245.asciidoc => e821d27a8b810821707ba860e31f8b78.asciidoc} (79%) rename docs/examples/{4d56b179242fed59e3d6476f817b6055.asciidoc => e84e23232c7ecc8d6377ec2c16a60269.asciidoc} (60%) create mode 100644 docs/examples/e891e1d4805172da45a81f62b6b44aca.asciidoc rename docs/examples/{3342c69b2c2303247217532956fcce85.asciidoc => e8cbe2269f3dff6b231e73119e81511d.asciidoc} (50%) delete mode 100644 docs/examples/e8e451bc8c45bcf16df43804c4fc8329.asciidoc delete mode 100644 docs/examples/e9c2e15b36372d5281c879d336322b6c.asciidoc create mode 100644 docs/examples/e9f9e184499a793828233e536fac0487.asciidoc create mode 100644 docs/examples/ea5391267ced860c00214c096e08c8d4.asciidoc rename docs/examples/{e9fe608f105d7e3268a15e409e2cb9ab.asciidoc => eada8af6588584ac88f1e5b15f4a5c2a.asciidoc} (92%) rename docs/examples/{eb30ba547e4a7b8f54f33ab259aca523.asciidoc => eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc} (85%) rename docs/examples/{9524a9b7373fa4eb2905183b0e806962.asciidoc => ecc57597f6b791d1151ad79d9f4ce67b.asciidoc} (86%) rename docs/examples/{b4a0d0ed512dffc10ee53bca2feca49b.asciidoc => edcfadbfb14d97a2f5e6e21ef7039818.asciidoc} (100%) delete mode 100644 docs/examples/ef0f4fa4272c47ff62fb7b422cf975e7.asciidoc create mode 100644 docs/examples/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc create mode 100644 docs/examples/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc delete mode 100644 docs/examples/ef9111c1648d7820925f12e07d1346c5.asciidoc rename docs/examples/{a42f33e15b0995bb4b6058659bfdea85.asciidoc => eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc} (100%) delete mode 100644 docs/examples/f0e21e03a07c8fa0209b0aafdb3791e6.asciidoc create mode 100644 docs/examples/f37173a75cd1b0d683c6f67819dd1de3.asciidoc rename docs/examples/{2bb2339ac055337abf753bddb7771659.asciidoc => f43d551aaaad73d979adf1b86533e6a3.asciidoc} (81%) rename docs/examples/{4d6997c70a1851f9151443c0d38b532e.asciidoc => f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc} (81%) rename docs/examples/{34efeade38445b2834749ced59782e25.asciidoc => f495f9c99916a05e3b28166d31955fad.asciidoc} (88%) delete mode 100644 docs/examples/f4a1008b3f9baa67bb03ce9ef5ab4cb4.asciidoc create mode 100644 docs/examples/f4f557716049b23f8840d58d71e748f0.asciidoc rename docs/examples/{73e5c88ad1488b213fb278ee1cb42289.asciidoc => f5815d573cee0447910c9668003887b8.asciidoc} (84%) delete mode 100644 docs/examples/f6b5032bf27c2445d28845be0d413970.asciidoc delete mode 100644 docs/examples/f6d6889667f56b8f49d2858070571a6b.asciidoc rename docs/examples/{06afce2955f9094d96d27067ebca32e8.asciidoc => f8a0010753b1ff563dc42d703902d2fa.asciidoc} (63%) delete mode 100644 docs/examples/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc delete mode 100644 docs/examples/f9636d7ef1a45be4f36418c875cf6bef.asciidoc create mode 100644 docs/examples/f9c8245cc13770dff052b6759a749efa.asciidoc delete mode 100644 docs/examples/fa0f4485cd48f986b7ae8cbb24e331c4.asciidoc rename docs/examples/{645c4c6e209719d3a4d25b1a629cb23b.asciidoc => fad524db23eb5718ff310956e590b00d.asciidoc} (100%) delete mode 100644 docs/examples/fbcf5078a6a9e09790553804054c36b3.asciidoc delete mode 100644 docs/examples/fdcaba9547180439ff4b6275034a5170.asciidoc delete mode 100644 docs/examples/fe5763d32955e8b65eb3048e97b1580c.asciidoc create mode 100644 docs/examples/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc create mode 100644 docs/examples/fe806011466e7cdc1590da186297edb6.asciidoc delete mode 100644 docs/examples/feefeb68144002fd1fff57b77b95b85e.asciidoc create mode 100644 docs/examples/ff09e13391cecb2e8b9dd440b37e065f.asciidoc create mode 100644 docs/examples/ff63ae39c34925dbfa54282ec9989124.asciidoc create mode 100644 utils/templates/example diff --git a/docs/examples/014b788c879e4aaa1020672e45e25473.asciidoc b/docs/examples/014b788c879e4aaa1020672e45e25473.asciidoc deleted file mode 100644 index 464b81839..000000000 --- a/docs/examples/014b788c879e4aaa1020672e45e25473.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// search.asciidoc:72 - -[source, python] ----- -resp = client.cluster.put_settings( - body={ - "transient": { - "cluster.routing.use_adaptive_replica_selection": False - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/0163af36c8472ac0c5160c8b716f5b26.asciidoc b/docs/examples/0163af36c8472ac0c5160c8b716f5b26.asciidoc new file mode 100644 index 000000000..a6b6b6116 --- /dev/null +++ b/docs/examples/0163af36c8472ac0c5160c8b716f5b26.asciidoc @@ -0,0 +1,15 @@ +// aggregations/bucket/filter-aggregation.asciidoc:58 + +[source, python] +---- +resp = client.search( + index="sales", + size="0", + filter_path="aggregations", + body={ + "query": {"term": {"type": "t-shirt"}}, + "aggs": {"avg_price": {"avg": {"field": "price"}}}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/0bbd30b9be3e54ff3028b9f4459634d2.asciidoc b/docs/examples/0246f73cc2ed3dfec577119e8cd15404.asciidoc similarity index 72% rename from docs/examples/0bbd30b9be3e54ff3028b9f4459634d2.asciidoc rename to docs/examples/0246f73cc2ed3dfec577119e8cd15404.asciidoc index 88d6ae779..cf6311f6b 100644 --- a/docs/examples/0bbd30b9be3e54ff3028b9f4459634d2.asciidoc +++ b/docs/examples/0246f73cc2ed3dfec577119e8cd15404.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:166 +// indices/put-mapping.asciidoc:177 [source, python] ---- resp = client.indices.put_mapping( - index="my_index", + index="my-index-000001", body={ "properties": {"name": {"properties": {"last": {"type": "text"}}}} }, diff --git a/docs/examples/025b54db0edc50c24ea48a2bd94366ad.asciidoc b/docs/examples/025b54db0edc50c24ea48a2bd94366ad.asciidoc deleted file mode 100644 index c120f437e..000000000 --- a/docs/examples/025b54db0edc50c24ea48a2bd94366ad.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// docs/update-by-query.asciidoc:599 - -[source, python] ----- -resp = client.search( - index="twitter", size="0", q="extra:test", filter_path="hits.total", -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/98b121bf47cebd85671a2cb519688d28.asciidoc b/docs/examples/0264e994a7e68561e2ca6be0f0d90ee9.asciidoc similarity index 86% rename from docs/examples/98b121bf47cebd85671a2cb519688d28.asciidoc rename to docs/examples/0264e994a7e68561e2ca6be0f0d90ee9.asciidoc index efb85bc13..a5cd8c9d7 100644 --- a/docs/examples/98b121bf47cebd85671a2cb519688d28.asciidoc +++ b/docs/examples/0264e994a7e68561e2ca6be0f0d90ee9.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:520 +// aggregations/bucket/terms-aggregation.asciidoc:571 [source, python] ---- diff --git a/docs/examples/0308cbd85281f95fc458042afe3f587d.asciidoc b/docs/examples/0308cbd85281f95fc458042afe3f587d.asciidoc new file mode 100644 index 000000000..e123c5da9 --- /dev/null +++ b/docs/examples/0308cbd85281f95fc458042afe3f587d.asciidoc @@ -0,0 +1,11 @@ +// docs/get.asciidoc:79 + +[source, python] +---- +resp = client.get( + index="my-index-000001", + id="0", + _source="*.id", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/033778305d52746f5ce0a2a922c8e521.asciidoc b/docs/examples/033778305d52746f5ce0a2a922c8e521.asciidoc deleted file mode 100644 index 1eec2764e..000000000 --- a/docs/examples/033778305d52746f5ce0a2a922c8e521.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:410 - -[source, python] ----- -resp = client.search( - body={ - "aggs": { - "genres": { - "terms": { - "script": { - "source": "doc['genre'].value", - "lang": "painless", - } - } - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/047266b0d20fdb62ebc72d51952c8f6d.asciidoc b/docs/examples/047266b0d20fdb62ebc72d51952c8f6d.asciidoc index 6de6245a9..0e046a8d3 100644 --- a/docs/examples/047266b0d20fdb62ebc72d51952c8f6d.asciidoc +++ b/docs/examples/047266b0d20fdb62ebc72d51952c8f6d.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:341 +// query-dsl/multi-match-query.asciidoc:344 [source, python] ---- diff --git a/docs/examples/048d8abd42d094bbdcf4452a58ccb35b.asciidoc b/docs/examples/048d8abd42d094bbdcf4452a58ccb35b.asciidoc deleted file mode 100644 index 2e99e064b..000000000 --- a/docs/examples/048d8abd42d094bbdcf4452a58ccb35b.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// docs/index_.asciidoc:487 - -[source, python] ----- -resp = client.create( - index="twitter", - id="1", - body={ - "user": "kimchy", - "post_date": "2009-11-15T14:12:12", - "message": "trying out Elasticsearch", - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc b/docs/examples/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc index 9637196cf..3ece42153 100644 --- a/docs/examples/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc +++ b/docs/examples/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc @@ -1,7 +1,10 @@ -// cluster/health.asciidoc:35 +// cluster/health.asciidoc:42 [source, python] ---- -resp = client.cluster.health(wait_for_status="yellow", timeout="50s") +resp = client.cluster.health( + wait_for_status="yellow", + timeout="50s", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/04fe1e3a0047b0cdb10987b79fc3f3f3.asciidoc b/docs/examples/04fe1e3a0047b0cdb10987b79fc3f3f3.asciidoc deleted file mode 100644 index 2423bb0bb..000000000 --- a/docs/examples/04fe1e3a0047b0cdb10987b79fc3f3f3.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// search/request/sort.asciidoc:568 - -[source, python] ----- -resp = client.search( - body={ - "query": {"term": {"user": "kimchy"}}, - "sort": { - "_script": { - "type": "number", - "script": { - "lang": "painless", - "source": "doc['field_name'].value * params.factor", - "params": {"factor": 1.1}, - }, - "order": "asc", - } - }, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/073539a7e38be3cdf13008330b6a536a.asciidoc b/docs/examples/073539a7e38be3cdf13008330b6a536a.asciidoc deleted file mode 100644 index 84f3e80fb..000000000 --- a/docs/examples/073539a7e38be3cdf13008330b6a536a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// cat/indices.asciidoc:94 - -[source, python] ----- -resp = client.cat.indices(index="twi*", v=True, s="index") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1bc731a4df952228af6dfa6b48627332.asciidoc b/docs/examples/07ba3eaa931f2cf110052e3544db51f8.asciidoc similarity index 67% rename from docs/examples/1bc731a4df952228af6dfa6b48627332.asciidoc rename to docs/examples/07ba3eaa931f2cf110052e3544db51f8.asciidoc index fa7f425aa..b08a09b4c 100644 --- a/docs/examples/1bc731a4df952228af6dfa6b48627332.asciidoc +++ b/docs/examples/07ba3eaa931f2cf110052e3544db51f8.asciidoc @@ -1,4 +1,4 @@ -// docs/reindex.asciidoc:815 +// docs/reindex.asciidoc:878 [source, python] ---- @@ -6,12 +6,12 @@ resp = client.reindex( body={ "max_docs": 10, "source": { - "index": "twitter", + "index": "my-index-000001", "query": { "function_score": {"random_score": {}, "min_score": 0.9} }, }, - "dest": {"index": "random_twitter"}, + "dest": {"index": "my-new-index-000001"}, }, ) print(resp) diff --git a/docs/examples/09ecba5814d71e4c44468575eada9878.asciidoc b/docs/examples/095d60b2cfc5004c97efc49f27287262.asciidoc similarity index 83% rename from docs/examples/09ecba5814d71e4c44468575eada9878.asciidoc rename to docs/examples/095d60b2cfc5004c97efc49f27287262.asciidoc index 791bfd677..0ec05e171 100644 --- a/docs/examples/09ecba5814d71e4c44468575eada9878.asciidoc +++ b/docs/examples/095d60b2cfc5004c97efc49f27287262.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:214 +// aggregations/bucket/datehistogram-aggregation.asciidoc:198 [source, python] ---- diff --git a/docs/examples/0989cc65d8924f666ce3eb0820d2d244.asciidoc b/docs/examples/0989cc65d8924f666ce3eb0820d2d244.asciidoc deleted file mode 100644 index ab936f0ce..000000000 --- a/docs/examples/0989cc65d8924f666ce3eb0820d2d244.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// indices/put-mapping.asciidoc:427 - -[source, python] ----- -resp = client.index( - index="users", refresh="wait_for", body={"user_id": 12345}, -) -print(resp) - -resp = client.index( - index="users", refresh="wait_for", body={"user_id": 12346}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/09cdd5ae8114c49886026fef8d00a19c.asciidoc b/docs/examples/09cdd5ae8114c49886026fef8d00a19c.asciidoc deleted file mode 100644 index 57c6b8019..000000000 --- a/docs/examples/09cdd5ae8114c49886026fef8d00a19c.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// indices/get-mapping.asciidoc:70 - -[source, python] ----- -resp = client.indices.get_mapping(index="_all") -print(resp) - -resp = client.indices.get_mapping() -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/09d617863a103c82fb4101e6165ea7fe.asciidoc b/docs/examples/09d617863a103c82fb4101e6165ea7fe.asciidoc index 6455d8253..b4ddfee0e 100644 --- a/docs/examples/09d617863a103c82fb4101e6165ea7fe.asciidoc +++ b/docs/examples/09d617863a103c82fb4101e6165ea7fe.asciidoc @@ -2,6 +2,8 @@ [source, python] ---- -resp = client.search(body={"query": {"match_all": {}}}) +resp = client.search( + body={"query": {"match_all": {}}}, +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/09dbd90c5e22ea4a17b4cf9aa72e08ae.asciidoc b/docs/examples/09dbd90c5e22ea4a17b4cf9aa72e08ae.asciidoc deleted file mode 100644 index 91c55244f..000000000 --- a/docs/examples/09dbd90c5e22ea4a17b4cf9aa72e08ae.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// api-conventions.asciidoc:222 - -[source, python] ----- -resp = client.search( - q="elasticsearch", - filter_path=["took", "hits.hits._id", "hits.hits._score"], -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/0ba0b2db24852abccb7c0fc1098d566e.asciidoc b/docs/examples/0ba0b2db24852abccb7c0fc1098d566e.asciidoc deleted file mode 100644 index 55d4517a5..000000000 --- a/docs/examples/0ba0b2db24852abccb7c0fc1098d566e.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// docs/get.asciidoc:366 - -[source, python] ----- -resp = client.index( - index="twitter", - id="2", - routing="user1", - body={"counter": 1, "tags": ["white"]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/0be2c28ee65384774b1e479b47dc3d92.asciidoc b/docs/examples/0be2c28ee65384774b1e479b47dc3d92.asciidoc deleted file mode 100644 index a8ab176d8..000000000 --- a/docs/examples/0be2c28ee65384774b1e479b47dc3d92.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/update-settings.asciidoc:114 - -[source, python] ----- -resp = client.indices.put_settings( - index="twitter", body={"index": {"refresh_interval": "1s"}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/0c4ad860a485fe53d8140ad3ccd11dcf.asciidoc b/docs/examples/0c4ad860a485fe53d8140ad3ccd11dcf.asciidoc deleted file mode 100644 index 86ed1a2d6..000000000 --- a/docs/examples/0c4ad860a485fe53d8140ad3ccd11dcf.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// query-dsl/terms-query.asciidoc:19 - -[source, python] ----- -resp = client.search( - body={ - "query": { - "terms": {"user": ["kimchy", "elasticsearch"], "boost": 1} - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/0c892d328b73d38396aaef6d9cbcd36b.asciidoc b/docs/examples/0c892d328b73d38396aaef6d9cbcd36b.asciidoc new file mode 100644 index 000000000..03bdd8bf3 --- /dev/null +++ b/docs/examples/0c892d328b73d38396aaef6d9cbcd36b.asciidoc @@ -0,0 +1,11 @@ +// docs/delete.asciidoc:82 + +[source, python] +---- +resp = client.delete( + index="my-index-000001", + id="1", + routing="shard-1", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/0cc991e3f7f8511a34730e154b3c5edc.asciidoc b/docs/examples/0cc991e3f7f8511a34730e154b3c5edc.asciidoc deleted file mode 100644 index e5433bedc..000000000 --- a/docs/examples/0cc991e3f7f8511a34730e154b3c5edc.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// docs/reindex.asciidoc:24 - -[source, python] ----- -resp = client.reindex( - body={ - "source": {"index": "twitter"}, - "dest": {"index": "new_twitter"}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/0ce3606f1dba490eef83c4317b315b62.asciidoc b/docs/examples/0ce3606f1dba490eef83c4317b315b62.asciidoc deleted file mode 100644 index 31bad24e2..000000000 --- a/docs/examples/0ce3606f1dba490eef83c4317b315b62.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// search/request-body.asciidoc:7 - -[source, python] ----- -resp = client.search( - index="twitter", body={"query": {"term": {"user": "kimchy"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/0e118857b815b62118a30c042f079db1.asciidoc b/docs/examples/0e118857b815b62118a30c042f079db1.asciidoc index 28661427c..d3f5d720d 100644 --- a/docs/examples/0e118857b815b62118a30c042f079db1.asciidoc +++ b/docs/examples/0e118857b815b62118a30c042f079db1.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:259 +// query-dsl/multi-match-query.asciidoc:262 [source, python] ---- diff --git a/docs/examples/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc b/docs/examples/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc new file mode 100644 index 000000000..9548ad10c --- /dev/null +++ b/docs/examples/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc @@ -0,0 +1,23 @@ +// aggregations/bucket/filter-aggregation.asciidoc:167 + +[source, python] +---- +resp = client.search( + index="sales", + size="0", + filter_path="aggregations", + body={ + "aggs": { + "hats": { + "filter": {"term": {"type": "hat"}}, + "aggs": {"avg_price": {"avg": {"field": "price"}}}, + }, + "t_shirts": { + "filter": {"term": {"type": "t-shirt"}}, + "aggs": {"avg_price": {"avg": {"field": "price"}}}, + }, + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc b/docs/examples/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc new file mode 100644 index 000000000..5831d48ab --- /dev/null +++ b/docs/examples/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc @@ -0,0 +1,24 @@ +// mapping/types/numeric.asciidoc:275 + +[source, python] +---- +resp = client.indices.create( + index="idx", + body={ + "mappings": { + "_source": {"mode": "synthetic"}, + "properties": { + "f": {"type": "scaled_float", "scaling_factor": 0.01} + }, + } + }, +) +print(resp) + +resp = client.index( + index="idx", + id="1", + body={"f": 123}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/1027ab1ca767ac1428176ef4f84bfbcf.asciidoc b/docs/examples/1027ab1ca767ac1428176ef4f84bfbcf.asciidoc deleted file mode 100644 index a06f0fa0c..000000000 --- a/docs/examples/1027ab1ca767ac1428176ef4f84bfbcf.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// search/request/scroll.asciidoc:206 - -[source, python] ----- -resp = client.search( - index="twitter", - scroll="1m", - body={ - "slice": {"id": 0, "max": 2}, - "query": {"match": {"title": "elasticsearch"}}, - }, -) -print(resp) - -resp = client.search( - index="twitter", - scroll="1m", - body={ - "slice": {"id": 1, "max": 2}, - "query": {"match": {"title": "elasticsearch"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/111c69ca94162c1523b799a5c14723dd.asciidoc b/docs/examples/111c69ca94162c1523b799a5c14723dd.asciidoc new file mode 100644 index 000000000..c33c7e0a9 --- /dev/null +++ b/docs/examples/111c69ca94162c1523b799a5c14723dd.asciidoc @@ -0,0 +1,11 @@ +// query-dsl/term-query.asciidoc:118 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + body={"full_text": "Quick Brown Foxes!"}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/8eaf4d5dd4ab1335deefa7749fdbbcc3.asciidoc b/docs/examples/1153bd92ca18356db927054958cd95c6.asciidoc similarity index 90% rename from docs/examples/8eaf4d5dd4ab1335deefa7749fdbbcc3.asciidoc rename to docs/examples/1153bd92ca18356db927054958cd95c6.asciidoc index a1864db8c..c909089d6 100644 --- a/docs/examples/8eaf4d5dd4ab1335deefa7749fdbbcc3.asciidoc +++ b/docs/examples/1153bd92ca18356db927054958cd95c6.asciidoc @@ -7,7 +7,7 @@ resp = client.search( "query": { "function_score": { "field_value_factor": { - "field": "likes", + "field": "my-int", "factor": 1.2, "modifier": "sqrt", "missing": 1, diff --git a/docs/examples/12433d2b637d002e8d5c9a1adce69d3b.asciidoc b/docs/examples/12433d2b637d002e8d5c9a1adce69d3b.asciidoc index 26a42283d..c405fd754 100644 --- a/docs/examples/12433d2b637d002e8d5c9a1adce69d3b.asciidoc +++ b/docs/examples/12433d2b637d002e8d5c9a1adce69d3b.asciidoc @@ -1,7 +1,9 @@ -// indices/put-mapping.asciidoc:84 +// indices/put-mapping.asciidoc:100 [source, python] ---- -resp = client.indices.create(index="publications") +resp = client.indices.create( + index="publications", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/1252fa45847edba5ec2b2f33da70ec5b.asciidoc b/docs/examples/1252fa45847edba5ec2b2f33da70ec5b.asciidoc deleted file mode 100644 index e9a2c88a4..000000000 --- a/docs/examples/1252fa45847edba5ec2b2f33da70ec5b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// api-conventions.asciidoc:273 - -[source, python] ----- -resp = client.cluster.state(filter_path="routing_table.indices.**.state") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1259a9c151730e42de35bb2d1ba700c6.asciidoc b/docs/examples/1259a9c151730e42de35bb2d1ba700c6.asciidoc new file mode 100644 index 000000000..2e9c38db7 --- /dev/null +++ b/docs/examples/1259a9c151730e42de35bb2d1ba700c6.asciidoc @@ -0,0 +1,9 @@ +// indices/get-mapping.asciidoc:70 + +[source, python] +---- +resp = client.indices.get_mapping( + index=["my-index-000001", "my-index-000002"], +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/137709a0a0dc38d6094291c9fc75b804.asciidoc b/docs/examples/137709a0a0dc38d6094291c9fc75b804.asciidoc new file mode 100644 index 000000000..517757c87 --- /dev/null +++ b/docs/examples/137709a0a0dc38d6094291c9fc75b804.asciidoc @@ -0,0 +1,11 @@ +// docs/get.asciidoc:342 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + body={"counter": 1, "tags": ["production"]}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/138ccd89f72aa7502dd9578403dcc589.asciidoc b/docs/examples/138ccd89f72aa7502dd9578403dcc589.asciidoc deleted file mode 100644 index 4eee2be7c..000000000 --- a/docs/examples/138ccd89f72aa7502dd9578403dcc589.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/get.asciidoc:53 - -[source, python] ----- -resp = client.get(index="twitter", id="0", _source="false") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc b/docs/examples/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc new file mode 100644 index 000000000..830c3662b --- /dev/null +++ b/docs/examples/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc @@ -0,0 +1,12 @@ +// docs/get.asciidoc:385 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="2", + routing="user1", + body={"counter": 1, "tags": ["env2"]}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/13d90ba227131aefbf4fcfd5992e662a.asciidoc b/docs/examples/13d90ba227131aefbf4fcfd5992e662a.asciidoc new file mode 100644 index 000000000..b6af18a29 --- /dev/null +++ b/docs/examples/13d90ba227131aefbf4fcfd5992e662a.asciidoc @@ -0,0 +1,38 @@ +// query-dsl/bool-query.asciidoc:153 + +[source, python] +---- +resp = client.search( + body={ + "query": { + "bool": { + "should": [ + { + "match": { + "name.first": { + "query": "shay", + "_name": "first", + } + } + }, + { + "match": { + "name.last": { + "query": "banon", + "_name": "last", + } + } + }, + ], + "filter": { + "terms": { + "name.last": ["banon", "kimchy"], + "_name": "test", + } + }, + } + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/14701dcc0cca9665fce2aace0cb62af7.asciidoc b/docs/examples/14701dcc0cca9665fce2aace0cb62af7.asciidoc deleted file mode 100644 index 8046288da..000000000 --- a/docs/examples/14701dcc0cca9665fce2aace0cb62af7.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// docs/delete-by-query.asciidoc:504 - -[source, python] ----- -resp = client.search( - index="twitter", - size="0", - filter_path="hits.total", - body={"query": {"range": {"likes": {"lt": 10}}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/be1bd47393646ac6bbee177d1cdb7738.asciidoc b/docs/examples/151d2b11807ec684b0c01aa89189a801.asciidoc similarity index 86% rename from docs/examples/be1bd47393646ac6bbee177d1cdb7738.asciidoc rename to docs/examples/151d2b11807ec684b0c01aa89189a801.asciidoc index 8c06df8aa..5525b0d14 100644 --- a/docs/examples/be1bd47393646ac6bbee177d1cdb7738.asciidoc +++ b/docs/examples/151d2b11807ec684b0c01aa89189a801.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:472 +// query-dsl/query-string-query.asciidoc:474 [source, python] ---- diff --git a/docs/examples/15dad5338065baaaa7d475abe85f4c22.asciidoc b/docs/examples/15dad5338065baaaa7d475abe85f4c22.asciidoc deleted file mode 100644 index ef9c2ddba..000000000 --- a/docs/examples/15dad5338065baaaa7d475abe85f4c22.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search/request/sort.asciidoc:515 - -[source, python] ----- -resp = client.search( - body={ - "sort": [ - { - "_geo_distance": { - "pin.location": [-70, 40], - "order": "asc", - "unit": "km", - } - } - ], - "query": {"term": {"user": "kimchy"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/178c920d5e8ec0071f77290fa059802c.asciidoc b/docs/examples/178c920d5e8ec0071f77290fa059802c.asciidoc new file mode 100644 index 000000000..2d2a0ef80 --- /dev/null +++ b/docs/examples/178c920d5e8ec0071f77290fa059802c.asciidoc @@ -0,0 +1,10 @@ +// indices/update-settings.asciidoc:122 + +[source, python] +---- +resp = client.indices.put_settings( + index="my-index-000001", + body={"index": {"refresh_interval": "1s"}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/179f0a3e84ff4bbac18787a018eabf89.asciidoc b/docs/examples/179f0a3e84ff4bbac18787a018eabf89.asciidoc index cb47e38ff..f23df10f7 100644 --- a/docs/examples/179f0a3e84ff4bbac18787a018eabf89.asciidoc +++ b/docs/examples/179f0a3e84ff4bbac18787a018eabf89.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:472 +// query-dsl/multi-match-query.asciidoc:482 [source, python] ---- diff --git a/docs/examples/189a921df2f5b1fe580937210ce9c1c2.asciidoc b/docs/examples/189a921df2f5b1fe580937210ce9c1c2.asciidoc deleted file mode 100644 index 14df612a4..000000000 --- a/docs/examples/189a921df2f5b1fe580937210ce9c1c2.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// search.asciidoc:96 - -[source, python] ----- -resp = client.search( - body={"query": {"match_all": {}}, "stats": ["group1", "group2"]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc b/docs/examples/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc index 00e955267..1cbef68b5 100644 --- a/docs/examples/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc +++ b/docs/examples/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc @@ -1,7 +1,9 @@ -// docs/update-by-query.asciidoc:491 +// docs/update-by-query.asciidoc:546 [source, python] ---- -resp = client.tasks.cancel(task_id="r1A2WoRbTwKZ516z6NEs5A:36619") +resp = client.tasks.cancel( + task_id="r1A2WoRbTwKZ516z6NEs5A:36619", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc b/docs/examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc index c214a7945..f5cd15364 100644 --- a/docs/examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc +++ b/docs/examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc @@ -1,4 +1,4 @@ -// docs/bulk.asciidoc:555 +// docs/bulk.asciidoc:625 [source, python] ---- diff --git a/docs/examples/1b542e3ea87a742f95641d64dcfb1bdb.asciidoc b/docs/examples/1b542e3ea87a742f95641d64dcfb1bdb.asciidoc deleted file mode 100644 index 8ea77ad33..000000000 --- a/docs/examples/1b542e3ea87a742f95641d64dcfb1bdb.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// search/count.asciidoc:7 - -[source, python] ----- -resp = client.count(index="twitter", q="user:kimchy") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1b8655e6ba99fe39933c6eafe78728b7.asciidoc b/docs/examples/1b8655e6ba99fe39933c6eafe78728b7.asciidoc deleted file mode 100644 index 5146ad665..000000000 --- a/docs/examples/1b8655e6ba99fe39933c6eafe78728b7.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// docs/reindex.asciidoc:200 - -[source, python] ----- -resp = client.reindex( - body={ - "source": {"index": "twitter", "slice": {"id": 0, "max": 2}}, - "dest": {"index": "new_twitter"}, - }, -) -print(resp) - -resp = client.reindex( - body={ - "source": {"index": "twitter", "slice": {"id": 1, "max": 2}}, - "dest": {"index": "new_twitter"}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1b8caf0a6741126c6d0ad83b56fce290.asciidoc b/docs/examples/1b8caf0a6741126c6d0ad83b56fce290.asciidoc deleted file mode 100644 index 52939f934..000000000 --- a/docs/examples/1b8caf0a6741126c6d0ad83b56fce290.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// indices/templates.asciidoc:146 - -[source, python] ----- -resp = client.indices.put_template( - name="template_1", - body={ - "index_patterns": ["te*"], - "settings": {"number_of_shards": 1}, - "aliases": { - "alias1": {}, - "alias2": { - "filter": {"term": {"user": "kimchy"}}, - "routing": "kimchy", - }, - "{index}-alias": {}, - }, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1cab9da122778a95061831265c250cc1.asciidoc b/docs/examples/1cab9da122778a95061831265c250cc1.asciidoc new file mode 100644 index 000000000..bf550b6ed --- /dev/null +++ b/docs/examples/1cab9da122778a95061831265c250cc1.asciidoc @@ -0,0 +1,19 @@ +// aggregations/metrics/valuecount-aggregation.asciidoc:49 + +[source, python] +---- +resp = client.search( + index="sales", + body={ + "size": 0, + "runtime_mappings": { + "tags": { + "type": "keyword", + "script": "\n emit(doc['type'].value);\n if (doc['promoted'].value) {\n emit('hot');\n }\n ", + } + }, + "aggs": {"tags_count": {"value_count": {"field": "tags"}}}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/1d65cb6d055c46a1bde809687d835b71.asciidoc b/docs/examples/1d65cb6d055c46a1bde809687d835b71.asciidoc deleted file mode 100644 index ff07bb680..000000000 --- a/docs/examples/1d65cb6d055c46a1bde809687d835b71.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/get.asciidoc:86 - -[source, python] ----- -resp = client.get(index="twitter", id="2", routing="user1") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1da77e114459e0b77d78a3dcc8fae429.asciidoc b/docs/examples/1da77e114459e0b77d78a3dcc8fae429.asciidoc deleted file mode 100644 index d9aad1a4b..000000000 --- a/docs/examples/1da77e114459e0b77d78a3dcc8fae429.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -// indices/put-mapping.asciidoc:109 - -[source, python] ----- -resp = client.indices.create(index="twitter-1") -print(resp) - -resp = client.indices.create(index="twitter-2") -print(resp) - -resp = client.indices.put_mapping( - index=["twitter-1", "twitter-2"], - body={"properties": {"user_name": {"type": "text"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc b/docs/examples/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc deleted file mode 100644 index 79f1146d3..000000000 --- a/docs/examples/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// api-conventions.asciidoc:250 - -[source, python] ----- -resp = client.cluster.state(filter_path="metadata.indices.*.stat*") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc b/docs/examples/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc deleted file mode 100644 index 12a2ee544..000000000 --- a/docs/examples/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// api-conventions.asciidoc:317 - -[source, python] ----- -resp = client.cluster.state( - filter_path=[ - "metadata.indices.*.state", - "-metadata.indices.logstash-*", - ], -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1e49eba5b9042c1900a608fe5105ba43.asciidoc b/docs/examples/1e49eba5b9042c1900a608fe5105ba43.asciidoc deleted file mode 100644 index cba18b92a..000000000 --- a/docs/examples/1e49eba5b9042c1900a608fe5105ba43.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// docs/delete-by-query.asciidoc:414 - -[source, python] ----- -resp = client.delete_by_query( - index="twitter", - body={ - "slice": {"id": 0, "max": 2}, - "query": {"range": {"likes": {"lt": 10}}}, - }, -) -print(resp) - -resp = client.delete_by_query( - index="twitter", - body={ - "slice": {"id": 1, "max": 2}, - "query": {"range": {"likes": {"lt": 10}}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1e50d993bd6517e6c381e82d09f0389e.asciidoc b/docs/examples/1e50d993bd6517e6c381e82d09f0389e.asciidoc deleted file mode 100644 index 7080ead3b..000000000 --- a/docs/examples/1e50d993bd6517e6c381e82d09f0389e.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// search/request/from-size.asciidoc:22 - -[source, python] ----- -resp = client.search( - body={ - "from": 5, - "size": 20, - "query": {"term": {"user.id": "8a4f500d"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/dc15e2373e5ecbe09b4ea0858eb63d47.asciidoc b/docs/examples/1e871f060dbe1a5c316ed205278804a8.asciidoc similarity index 92% rename from docs/examples/dc15e2373e5ecbe09b4ea0858eb63d47.asciidoc rename to docs/examples/1e871f060dbe1a5c316ed205278804a8.asciidoc index a9519b3e3..ebf31cc5e 100644 --- a/docs/examples/dc15e2373e5ecbe09b4ea0858eb63d47.asciidoc +++ b/docs/examples/1e871f060dbe1a5c316ed205278804a8.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:309 +// aggregations/bucket/terms-aggregation.asciidoc:338 [source, python] ---- diff --git a/docs/examples/1f336ecc62480c1d56351cc2f82d0d08.asciidoc b/docs/examples/1f336ecc62480c1d56351cc2f82d0d08.asciidoc deleted file mode 100644 index 2685f599f..000000000 --- a/docs/examples/1f336ecc62480c1d56351cc2f82d0d08.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// docs/index_.asciidoc:396 - -[source, python] ----- -resp = client.index( - index="twitter", - id="1", - version="2", - version_type="external", - body={ - "message": "elasticsearch now has versioning support, double cool!" - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/3e573bfabe00f8bfb8bb69aa5820768e.asciidoc b/docs/examples/1f673e1a0de2970dc648618d5425a994.asciidoc similarity index 57% rename from docs/examples/3e573bfabe00f8bfb8bb69aa5820768e.asciidoc rename to docs/examples/1f673e1a0de2970dc648618d5425a994.asciidoc index bf9afc970..d9fc26178 100644 --- a/docs/examples/3e573bfabe00f8bfb8bb69aa5820768e.asciidoc +++ b/docs/examples/1f673e1a0de2970dc648618d5425a994.asciidoc @@ -1,4 +1,4 @@ -// docs/delete-by-query.asciidoc:449 +// docs/reindex.asciidoc:267 [source, python] ---- @@ -6,10 +6,9 @@ resp = client.indices.refresh() print(resp) resp = client.search( - index="twitter", + index="my-new-index-000001", size="0", filter_path="hits.total", - body={"query": {"range": {"likes": {"lt": 10}}}}, ) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/6138d6919f3cbaaf61e1092f817d295c.asciidoc b/docs/examples/20005d8a6555b259b299d862cd218701.asciidoc similarity index 100% rename from docs/examples/6138d6919f3cbaaf61e1092f817d295c.asciidoc rename to docs/examples/20005d8a6555b259b299d862cd218701.asciidoc diff --git a/docs/examples/210cf5c76bff517f48e80fa1c2d63907.asciidoc b/docs/examples/210cf5c76bff517f48e80fa1c2d63907.asciidoc deleted file mode 100644 index a09f609f5..000000000 --- a/docs/examples/210cf5c76bff517f48e80fa1c2d63907.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// indices/put-mapping.asciidoc:553 - -[source, python] ----- -resp = client.indices.get_mapping(index="my_index") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/213ab768f1b6a895e09403a0880e259a.asciidoc b/docs/examples/213ab768f1b6a895e09403a0880e259a.asciidoc deleted file mode 100644 index c4ff75aa2..000000000 --- a/docs/examples/213ab768f1b6a895e09403a0880e259a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// aggregations/metrics/valuecount-aggregation.asciidoc:65 - -[source, python] ----- -resp = client.search( - index="sales", - size="0", - body={ - "aggs": { - "types_count": { - "value_count": { - "script": { - "id": "my_script", - "params": {"field": "type"}, - } - } - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/216848930c2d344fe0bed0daa70c35b9.asciidoc b/docs/examples/216848930c2d344fe0bed0daa70c35b9.asciidoc index 17f6673dd..08373ff3c 100644 --- a/docs/examples/216848930c2d344fe0bed0daa70c35b9.asciidoc +++ b/docs/examples/216848930c2d344fe0bed0daa70c35b9.asciidoc @@ -1,7 +1,10 @@ -// docs/delete-by-query.asciidoc:586 +// docs/delete-by-query.asciidoc:620 [source, python] ---- -resp = client.tasks.list(detailed="true", actions="*/delete/byquery") +resp = client.tasks.list( + detailed="true", + actions="*/delete/byquery", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc b/docs/examples/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc new file mode 100644 index 000000000..4f2008a2b --- /dev/null +++ b/docs/examples/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc @@ -0,0 +1,25 @@ +// query-dsl/nested-query.asciidoc:415 + +[source, python] +---- +resp = client.search( + index="my-index", + body={ + "query": { + "bool": { + "must_not": [ + { + "nested": { + "path": "comments", + "query": { + "term": {"comments.author": "nik9000"} + }, + } + } + ] + } + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc b/docs/examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc deleted file mode 100644 index 240e3b119..000000000 --- a/docs/examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -// search/request/sort.asciidoc:289 - -[source, python] ----- -resp = client.search( - body={ - "query": { - "nested": { - "path": "parent", - "query": { - "bool": { - "must": {"range": {"parent.age": {"gte": 21}}}, - "filter": { - "nested": { - "path": "parent.child", - "query": { - "match": {"parent.child.name": "matt"} - }, - } - }, - } - }, - } - }, - "sort": [ - { - "parent.child.age": { - "mode": "min", - "order": "asc", - "nested": { - "path": "parent", - "filter": {"range": {"parent.age": {"gte": 21}}}, - "nested": { - "path": "parent.child", - "filter": { - "match": {"parent.child.name": "matt"} - }, - }, - }, - } - } - ], - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/231aa0bb39c35fe199d28fe0e4a62b2e.asciidoc b/docs/examples/231aa0bb39c35fe199d28fe0e4a62b2e.asciidoc deleted file mode 100644 index 879ecad99..000000000 --- a/docs/examples/231aa0bb39c35fe199d28fe0e4a62b2e.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// getting-started.asciidoc:495 - -[source, python] ----- -resp = client.search( - index="bank", - body={"query": {"match_phrase": {"address": "mill lane"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/23ab0f1023b1b2cd5cdf2a8f9ccfd57b.asciidoc b/docs/examples/23ab0f1023b1b2cd5cdf2a8f9ccfd57b.asciidoc deleted file mode 100644 index 7f02f94e5..000000000 --- a/docs/examples/23ab0f1023b1b2cd5cdf2a8f9ccfd57b.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// indices/aliases.asciidoc:298 - -[source, python] ----- -resp = client.indices.create( - index="test1", - body={"mappings": {"properties": {"user": {"type": "keyword"}}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/36b2778f23d0955255f52c075c4d213d.asciidoc b/docs/examples/242a26ced0e5706e48dcda19a4003094.asciidoc similarity index 73% rename from docs/examples/36b2778f23d0955255f52c075c4d213d.asciidoc rename to docs/examples/242a26ced0e5706e48dcda19a4003094.asciidoc index f2688022c..36be186f9 100644 --- a/docs/examples/36b2778f23d0955255f52c075c4d213d.asciidoc +++ b/docs/examples/242a26ced0e5706e48dcda19a4003094.asciidoc @@ -1,4 +1,4 @@ -// docs/reindex.asciidoc:901 +// docs/reindex.asciidoc:964 [source, python] ---- @@ -10,10 +10,10 @@ resp = client.reindex( "username": "user", "password": "pass", }, - "index": "source", + "index": "my-index-000001", "query": {"match": {"test": "data"}}, }, - "dest": {"index": "dest"}, + "dest": {"index": "my-new-index-000001"}, }, ) print(resp) diff --git a/docs/examples/2468ab381257d759d8a88af1141f6f9c.asciidoc b/docs/examples/2468ab381257d759d8a88af1141f6f9c.asciidoc deleted file mode 100644 index ec7947ebd..000000000 --- a/docs/examples/2468ab381257d759d8a88af1141f6f9c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/get.asciidoc:288 - -[source, python] ----- -resp = client.exists_source(index="twitter", id="1") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/251ea12c1248385ab409906ac64d9ee9.asciidoc b/docs/examples/251ea12c1248385ab409906ac64d9ee9.asciidoc deleted file mode 100644 index f10c5cb6e..000000000 --- a/docs/examples/251ea12c1248385ab409906ac64d9ee9.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -// getting-started.asciidoc:544 - -[source, python] ----- -resp = client.search( - index="bank", - body={ - "query": { - "bool": { - "must": {"match_all": {}}, - "filter": { - "range": {"balance": {"gte": 20000, "lte": 30000}} - }, - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/6f21a878fee3b43c5332b81aaddbeac7.asciidoc b/docs/examples/25576b6773322f0929d4c635a940dba0.asciidoc similarity index 88% rename from docs/examples/6f21a878fee3b43c5332b81aaddbeac7.asciidoc rename to docs/examples/25576b6773322f0929d4c635a940dba0.asciidoc index 460ca9f35..43543fedf 100644 --- a/docs/examples/6f21a878fee3b43c5332b81aaddbeac7.asciidoc +++ b/docs/examples/25576b6773322f0929d4c635a940dba0.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:528 +// query-dsl/query-string-query.asciidoc:530 [source, python] ---- diff --git a/docs/examples/69a7be47f85138b10437113ab2f0d72d.asciidoc b/docs/examples/25a0dad6547d432f5a3d394528f1c138.asciidoc similarity index 70% rename from docs/examples/69a7be47f85138b10437113ab2f0d72d.asciidoc rename to docs/examples/25a0dad6547d432f5a3d394528f1c138.asciidoc index 4a29f695d..ec0b7d4be 100644 --- a/docs/examples/69a7be47f85138b10437113ab2f0d72d.asciidoc +++ b/docs/examples/25a0dad6547d432f5a3d394528f1c138.asciidoc @@ -1,9 +1,9 @@ -// docs/get.asciidoc:376 +// docs/get.asciidoc:395 [source, python] ---- resp = client.get( - index="twitter", + index="my-index-000001", id="2", routing="user1", stored_fields=["tags", "counter"], diff --git a/docs/examples/2891aa10ee9d474780adf94d5607f2db.asciidoc b/docs/examples/2891aa10ee9d474780adf94d5607f2db.asciidoc deleted file mode 100644 index ca98225bb..000000000 --- a/docs/examples/2891aa10ee9d474780adf94d5607f2db.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// search/request/sort.asciidoc:153 - -[source, python] ----- -resp = client.search( - index=["index_long", "index_double"], - body={"sort": [{"field": {"numeric_type": "double"}}]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/618d5f3d35921d8cb7e9ccfbe9a4c3e3.asciidoc b/docs/examples/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc similarity index 83% rename from docs/examples/618d5f3d35921d8cb7e9ccfbe9a4c3e3.asciidoc rename to docs/examples/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc index b32aad763..d9cad9384 100644 --- a/docs/examples/618d5f3d35921d8cb7e9ccfbe9a4c3e3.asciidoc +++ b/docs/examples/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc @@ -6,9 +6,10 @@ resp = client.search( body={ "query": { "regexp": { - "user": { + "user.id": { "value": "k.*y", "flags": "ALL", + "case_insensitive": True, "max_determinized_states": 10000, "rewrite": "constant_score", } diff --git a/docs/examples/2932e6f71e247cf52e11d2f38f114ddf.asciidoc b/docs/examples/2932e6f71e247cf52e11d2f38f114ddf.asciidoc new file mode 100644 index 000000000..d8a8040ed --- /dev/null +++ b/docs/examples/2932e6f71e247cf52e11d2f38f114ddf.asciidoc @@ -0,0 +1,14 @@ +// docs/reindex.asciidoc:294 + +[source, python] +---- +resp = client.reindex( + slices="5", + refresh=True, + body={ + "source": {"index": "my-index-000001"}, + "dest": {"index": "my-new-index-000001"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/2a247e36a86a373bcbf478ac9a588f44.asciidoc b/docs/examples/2a247e36a86a373bcbf478ac9a588f44.asciidoc new file mode 100644 index 000000000..4c5744034 --- /dev/null +++ b/docs/examples/2a247e36a86a373bcbf478ac9a588f44.asciidoc @@ -0,0 +1,15 @@ +// docs/index_.asciidoc:328 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + routing="kimchy", + body={ + "@timestamp": "2099-11-15T13:12:00", + "message": "GET /search HTTP/1.1 200 1070000", + "user": {"id": "kimchy"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/ad6ea0c1e46712aa1fd6d3bfa0ec979e.asciidoc b/docs/examples/2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc similarity index 85% rename from docs/examples/ad6ea0c1e46712aa1fd6d3bfa0ec979e.asciidoc rename to docs/examples/2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc index a5f996f57..e2ea2f288 100644 --- a/docs/examples/ad6ea0c1e46712aa1fd6d3bfa0ec979e.asciidoc +++ b/docs/examples/2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:42 +// query-dsl/query-string-query.asciidoc:45 [source, python] ---- diff --git a/docs/examples/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc b/docs/examples/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc new file mode 100644 index 000000000..0749a99e8 --- /dev/null +++ b/docs/examples/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc @@ -0,0 +1,10 @@ +// docs/update-by-query.asciidoc:369 + +[source, python] +---- +resp = client.update_by_query( + index="my-index-000001", + body={"query": {"term": {"user.id": "kimchy"}}, "max_docs": 1}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/2d01a9e5550b525496757f1bd7f0e706.asciidoc b/docs/examples/2d01a9e5550b525496757f1bd7f0e706.asciidoc new file mode 100644 index 000000000..43d88b771 --- /dev/null +++ b/docs/examples/2d01a9e5550b525496757f1bd7f0e706.asciidoc @@ -0,0 +1,16 @@ +// docs/index_.asciidoc:456 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + timeout="5m", + body={ + "@timestamp": "2099-11-15T13:12:00", + "message": "GET /search HTTP/1.1 200 1070000", + "user": {"id": "kimchy"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/72231b7debac60c95b9869a97dafda3a.asciidoc b/docs/examples/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc similarity index 100% rename from docs/examples/72231b7debac60c95b9869a97dafda3a.asciidoc rename to docs/examples/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc diff --git a/docs/examples/804a97ff4d0613e6568e4efb19c52021.asciidoc b/docs/examples/2fa45d74ba9933188c4728f8a9e5372c.asciidoc similarity index 76% rename from docs/examples/804a97ff4d0613e6568e4efb19c52021.asciidoc rename to docs/examples/2fa45d74ba9933188c4728f8a9e5372c.asciidoc index 06f456f9b..14b05addd 100644 --- a/docs/examples/804a97ff4d0613e6568e4efb19c52021.asciidoc +++ b/docs/examples/2fa45d74ba9933188c4728f8a9e5372c.asciidoc @@ -1,11 +1,11 @@ -// docs/index_.asciidoc:147 +// docs/index_.asciidoc:227 [source, python] ---- resp = client.cluster.put_settings( body={ "persistent": { - "action.auto_create_index": "twitter,index10,-index1*,+ind*" + "action.auto_create_index": "my-index-000001,index10,-index1*,+ind*" } }, ) diff --git a/docs/examples/2fd69fb0538e4f36ac69a8b8f8bf5ae8.asciidoc b/docs/examples/2fd69fb0538e4f36ac69a8b8f8bf5ae8.asciidoc deleted file mode 100644 index 68a3caddd..000000000 --- a/docs/examples/2fd69fb0538e4f36ac69a8b8f8bf5ae8.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// docs/update-by-query.asciidoc:348 - -[source, python] ----- -resp = client.update_by_query( - index="twitter", - body={ - "script": {"source": "ctx._source.likes++", "lang": "painless"}, - "query": {"term": {"user": "kimchy"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc b/docs/examples/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc index d87569630..90b8c898e 100644 --- a/docs/examples/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc +++ b/docs/examples/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc @@ -1,4 +1,4 @@ -// docs/update-by-query.asciidoc:655 +// docs/update-by-query.asciidoc:710 [source, python] ---- diff --git a/docs/examples/0ac9916f47a2483b89c1416684af322a.asciidoc b/docs/examples/2fea3e324939cc7e9c396964aeee7111.asciidoc similarity index 100% rename from docs/examples/0ac9916f47a2483b89c1416684af322a.asciidoc rename to docs/examples/2fea3e324939cc7e9c396964aeee7111.asciidoc diff --git a/docs/examples/30f3e3b9df46afd12e68bc71f18483b4.asciidoc b/docs/examples/30f3e3b9df46afd12e68bc71f18483b4.asciidoc new file mode 100644 index 000000000..7d7924041 --- /dev/null +++ b/docs/examples/30f3e3b9df46afd12e68bc71f18483b4.asciidoc @@ -0,0 +1,24 @@ +// indices/put-mapping.asciidoc:125 + +[source, python] +---- +resp = client.indices.create( + index="my-index-000001", +) +print(resp) + +resp = client.indices.create( + index="my-index-000002", +) +print(resp) + +resp = client.indices.put_mapping( + index=["my-index-000001", "my-index-000002"], + body={ + "properties": { + "user": {"properties": {"name": {"type": "keyword"}}} + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/311c4b632a29b9ead63b02d01f10096b.asciidoc b/docs/examples/311c4b632a29b9ead63b02d01f10096b.asciidoc deleted file mode 100644 index da29182b1..000000000 --- a/docs/examples/311c4b632a29b9ead63b02d01f10096b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// getting-started.asciidoc:251 - -[source, python] ----- -resp = client.index(index="customer", id="1", body={"name": "John Doe"}) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/39a6a038c4b551022afe83de0523634e.asciidoc b/docs/examples/316cd43feb3b86396483903af1a048b1.asciidoc similarity index 85% rename from docs/examples/39a6a038c4b551022afe83de0523634e.asciidoc rename to docs/examples/316cd43feb3b86396483903af1a048b1.asciidoc index ffc415541..6d040bd6d 100644 --- a/docs/examples/39a6a038c4b551022afe83de0523634e.asciidoc +++ b/docs/examples/316cd43feb3b86396483903af1a048b1.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:636 +// aggregations/bucket/datehistogram-aggregation.asciidoc:781 [source, python] ---- diff --git a/docs/examples/33f148e3d8676de6cc52f58749898a13.asciidoc b/docs/examples/33f148e3d8676de6cc52f58749898a13.asciidoc index 6a9746e30..8951713f0 100644 --- a/docs/examples/33f148e3d8676de6cc52f58749898a13.asciidoc +++ b/docs/examples/33f148e3d8676de6cc52f58749898a13.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:275 +// query-dsl/multi-match-query.asciidoc:278 [source, python] ---- diff --git a/docs/examples/344b4144244d57f87c6aa4652b100b25.asciidoc b/docs/examples/344b4144244d57f87c6aa4652b100b25.asciidoc new file mode 100644 index 000000000..bf1b1dda0 --- /dev/null +++ b/docs/examples/344b4144244d57f87c6aa4652b100b25.asciidoc @@ -0,0 +1,11 @@ +// query-dsl/terms-query.asciidoc:167 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="2", + body={"color": "blue"}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/3544f17cb97b613a2f733707c676f759.asciidoc b/docs/examples/3544f17cb97b613a2f733707c676f759.asciidoc new file mode 100644 index 000000000..6beeba3dd --- /dev/null +++ b/docs/examples/3544f17cb97b613a2f733707c676f759.asciidoc @@ -0,0 +1,24 @@ +// aggregations/bucket/filter-aggregation.asciidoc:122 + +[source, python] +---- +resp = client.search( + index="sales", + size="0", + filter_path="aggregations", + body={ + "aggs": { + "f": { + "filters": { + "filters": { + "hats": {"term": {"type": "hat"}}, + "t_shirts": {"term": {"type": "t-shirt"}}, + } + }, + "aggs": {"avg_price": {"avg": {"field": "price"}}}, + } + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc b/docs/examples/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc new file mode 100644 index 000000000..1c4010587 --- /dev/null +++ b/docs/examples/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc @@ -0,0 +1,12 @@ +// docs/reindex.asciidoc:716 + +[source, python] +---- +resp = client.reindex( + body={ + "source": {"index": ["my-index-000001", "my-index-000002"]}, + "dest": {"index": "my-new-index-000002"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/36063ff9a318dba7bb0be3a230655dc8.asciidoc b/docs/examples/36063ff9a318dba7bb0be3a230655dc8.asciidoc new file mode 100644 index 000000000..a6e093c17 --- /dev/null +++ b/docs/examples/36063ff9a318dba7bb0be3a230655dc8.asciidoc @@ -0,0 +1,22 @@ +// mapping/types/numeric.asciidoc:247 + +[source, python] +---- +resp = client.indices.create( + index="idx", + body={ + "mappings": { + "_source": {"mode": "synthetic"}, + "properties": {"long": {"type": "long"}}, + } + }, +) +print(resp) + +resp = client.index( + index="idx", + id="1", + body={"long": [0, 0, -123466, 87612]}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/3653567181f43a5f64c74f934aa821c2.asciidoc b/docs/examples/3653567181f43a5f64c74f934aa821c2.asciidoc deleted file mode 100644 index 396216561..000000000 --- a/docs/examples/3653567181f43a5f64c74f934aa821c2.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/aliases.asciidoc:182 - -[source, python] ----- -resp = client.indices.update_aliases( - body={"actions": [{"remove": {"index": "test1", "alias": "alias1"}}]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/36818c6d9f434d387819c30bd9addb14.asciidoc b/docs/examples/36818c6d9f434d387819c30bd9addb14.asciidoc deleted file mode 100644 index e71314e92..000000000 --- a/docs/examples/36818c6d9f434d387819c30bd9addb14.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// docs/index_.asciidoc:196 - -[source, python] ----- -resp = client.index( - index="twitter", - body={ - "user": "kimchy", - "post_date": "2009-11-15T14:12:12", - "message": "trying out Elasticsearch", - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/3722cb3705b6bc7f486969deace3dd83.asciidoc b/docs/examples/3722cb3705b6bc7f486969deace3dd83.asciidoc deleted file mode 100644 index a9d2373b8..000000000 --- a/docs/examples/3722cb3705b6bc7f486969deace3dd83.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -// aggregations/metrics/valuecount-aggregation.asciidoc:46 - -[source, python] ----- -resp = client.search( - index="sales", - size="0", - body={ - "aggs": { - "type_count": { - "value_count": {"script": {"source": "doc['type'].value"}} - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/cd5bc5bf7cd58d7b1492c9c298b345f6.asciidoc b/docs/examples/37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc similarity index 88% rename from docs/examples/cd5bc5bf7cd58d7b1492c9c298b345f6.asciidoc rename to docs/examples/37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc index eb416bc7e..cfce9ed03 100644 --- a/docs/examples/cd5bc5bf7cd58d7b1492c9c298b345f6.asciidoc +++ b/docs/examples/37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:672 +// aggregations/bucket/terms-aggregation.asciidoc:731 [source, python] ---- diff --git a/docs/examples/9e56d79ad9a02b642c361f0b85dd95d7.asciidoc b/docs/examples/378e55f78fa13578a1302bae8d479765.asciidoc similarity index 67% rename from docs/examples/9e56d79ad9a02b642c361f0b85dd95d7.asciidoc rename to docs/examples/378e55f78fa13578a1302bae8d479765.asciidoc index dc00921c4..d9133a1f6 100644 --- a/docs/examples/9e56d79ad9a02b642c361f0b85dd95d7.asciidoc +++ b/docs/examples/378e55f78fa13578a1302bae8d479765.asciidoc @@ -1,9 +1,9 @@ -// query-dsl/terms-query.asciidoc:127 +// query-dsl/terms-query.asciidoc:134 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={"mappings": {"properties": {"color": {"type": "keyword"}}}}, ) print(resp) diff --git a/docs/examples/381fced1882ca8337143e6bb180a5715.asciidoc b/docs/examples/381fced1882ca8337143e6bb180a5715.asciidoc deleted file mode 100644 index dd4bfd146..000000000 --- a/docs/examples/381fced1882ca8337143e6bb180a5715.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// docs/update.asciidoc:84 - -[source, python] ----- -resp = client.index( - index="test", id="1", body={"counter": 1, "tags": ["red"]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/38c1d0f6668e9563c0827f839f9fa505.asciidoc b/docs/examples/38c1d0f6668e9563c0827f839f9fa505.asciidoc deleted file mode 100644 index 00c80bbd1..000000000 --- a/docs/examples/38c1d0f6668e9563c0827f839f9fa505.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// docs/update.asciidoc:218 - -[source, python] ----- -resp = client.update( - index="test", id="1", body={"doc": {"name": "new_name"}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/39ce44333d28ed2b833722d3e3cb06f3.asciidoc b/docs/examples/39ce44333d28ed2b833722d3e3cb06f3.asciidoc new file mode 100644 index 000000000..e3ab186d4 --- /dev/null +++ b/docs/examples/39ce44333d28ed2b833722d3e3cb06f3.asciidoc @@ -0,0 +1,39 @@ +// query-dsl/bool-query.asciidoc:181 + +[source, python] +---- +resp = client.search( + include_named_queries_score=True, + body={ + "query": { + "bool": { + "should": [ + { + "match": { + "name.first": { + "query": "shay", + "_name": "first", + } + } + }, + { + "match": { + "name.last": { + "query": "banon", + "_name": "last", + } + } + }, + ], + "filter": { + "terms": { + "name.last": ["banon", "kimchy"], + "_name": "test", + } + }, + } + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/3a700f836d8d5da1b656a876554028aa.asciidoc b/docs/examples/3a700f836d8d5da1b656a876554028aa.asciidoc deleted file mode 100644 index bf786d7dd..000000000 --- a/docs/examples/3a700f836d8d5da1b656a876554028aa.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// search/request/scroll.asciidoc:172 - -[source, python] ----- -resp = client.clear_scroll( - body={ - "scroll_id": [ - "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB", - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/3ae03ba3b56e5e287953094050766738.asciidoc b/docs/examples/3ae03ba3b56e5e287953094050766738.asciidoc deleted file mode 100644 index 6ca01adbe..000000000 --- a/docs/examples/3ae03ba3b56e5e287953094050766738.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// docs/reindex.asciidoc:233 - -[source, python] ----- -resp = client.indices.refresh() -print(resp) - -resp = client.search( - index="new_twitter", size="0", filter_path="hits.total", -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/3b04cc894e6a47d57983484010feac0c.asciidoc b/docs/examples/3b04cc894e6a47d57983484010feac0c.asciidoc index 74ec0cfd0..37d831202 100644 --- a/docs/examples/3b04cc894e6a47d57983484010feac0c.asciidoc +++ b/docs/examples/3b04cc894e6a47d57983484010feac0c.asciidoc @@ -1,10 +1,16 @@ -// docs/reindex.asciidoc:800 +// docs/reindex.asciidoc:863 [source, python] ---- -resp = client.get(index="metricbeat-2016.05.30-1", id="1") +resp = client.get( + index="metricbeat-2016.05.30-1", + id="1", +) print(resp) -resp = client.get(index="metricbeat-2016.05.31-1", id="1") +resp = client.get( + index="metricbeat-2016.05.31-1", + id="1", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/3b8ab7027e0d616fb432acd8813e086c.asciidoc b/docs/examples/3b8ab7027e0d616fb432acd8813e086c.asciidoc new file mode 100644 index 000000000..1ba4988d4 --- /dev/null +++ b/docs/examples/3b8ab7027e0d616fb432acd8813e086c.asciidoc @@ -0,0 +1,15 @@ +// docs/index_.asciidoc:544 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + body={ + "@timestamp": "2099-11-15T13:12:00", + "message": "GET /search HTTP/1.1 200 1070000", + "user": {"id": "kimchy"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/1216f8f7367df3aa823012cef310c08a.asciidoc b/docs/examples/3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc similarity index 58% rename from docs/examples/1216f8f7367df3aa823012cef310c08a.asciidoc rename to docs/examples/3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc index bc853fb5c..9bb3ffd31 100644 --- a/docs/examples/1216f8f7367df3aa823012cef310c08a.asciidoc +++ b/docs/examples/3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc @@ -1,11 +1,11 @@ -// docs/reindex.asciidoc:712 +// docs/reindex.asciidoc:775 [source, python] ---- resp = client.reindex( body={ - "source": {"index": "test"}, - "dest": {"index": "test2"}, + "source": {"index": "my-index-000001"}, + "dest": {"index": "my-new-index-000001"}, "script": { "source": 'ctx._source.tag = ctx._source.remove("flag")' }, diff --git a/docs/examples/75330ec1305d2beb0e2f34d2195464e2.asciidoc b/docs/examples/3d1a0e1dc5310544d032108ae0b3f099.asciidoc similarity index 51% rename from docs/examples/75330ec1305d2beb0e2f34d2195464e2.asciidoc rename to docs/examples/3d1a0e1dc5310544d032108ae0b3f099.asciidoc index 1483c7fdd..be1ee4666 100644 --- a/docs/examples/75330ec1305d2beb0e2f34d2195464e2.asciidoc +++ b/docs/examples/3d1a0e1dc5310544d032108ae0b3f099.asciidoc @@ -2,6 +2,8 @@ [source, python] ---- -resp = client.search(body={"query": {"match_all": {"boost": 1.2}}}) +resp = client.search( + body={"query": {"match_all": {"boost": 1.2}}}, +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/3d1ff6097e2359f927c88c2ccdb36252.asciidoc b/docs/examples/3d1ff6097e2359f927c88c2ccdb36252.asciidoc deleted file mode 100644 index d5a7eff25..000000000 --- a/docs/examples/3d1ff6097e2359f927c88c2ccdb36252.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// setup/install/check-running.asciidoc:7 - -[source, python] ----- -resp = client.info() -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/3db2b5a6424aa92ecab7a8640c38685a.asciidoc b/docs/examples/3db2b5a6424aa92ecab7a8640c38685a.asciidoc new file mode 100644 index 000000000..b90ceeae4 --- /dev/null +++ b/docs/examples/3db2b5a6424aa92ecab7a8640c38685a.asciidoc @@ -0,0 +1,10 @@ +// docs/delete.asciidoc:180 + +[source, python] +---- +resp = client.delete( + index="my-index-000001", + id="1", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/3f3b3e207f79303ce6f86e03e928e062.asciidoc b/docs/examples/3f3b3e207f79303ce6f86e03e928e062.asciidoc deleted file mode 100644 index 5614de858..000000000 --- a/docs/examples/3f3b3e207f79303ce6f86e03e928e062.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// getting-started.asciidoc:290 - -[source, python] ----- -resp = client.get(index="customer", id="1") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/e17e8852ec3f31781e1364f4dffeb6d0.asciidoc b/docs/examples/3faf5e2873de340acfe0a617017db784.asciidoc similarity index 84% rename from docs/examples/e17e8852ec3f31781e1364f4dffeb6d0.asciidoc rename to docs/examples/3faf5e2873de340acfe0a617017db784.asciidoc index 42f9354fb..8b63eedcf 100644 --- a/docs/examples/e17e8852ec3f31781e1364f4dffeb6d0.asciidoc +++ b/docs/examples/3faf5e2873de340acfe0a617017db784.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:281 +// query-dsl/query-string-query.asciidoc:283 [source, python] ---- diff --git a/docs/examples/400e89eb46ead8e9c9e40f123fd5e590.asciidoc b/docs/examples/400e89eb46ead8e9c9e40f123fd5e590.asciidoc index 436d19ca0..99d9138f9 100644 --- a/docs/examples/400e89eb46ead8e9c9e40f123fd5e590.asciidoc +++ b/docs/examples/400e89eb46ead8e9c9e40f123fd5e590.asciidoc @@ -1,4 +1,4 @@ -// docs/reindex.asciidoc:394 +// docs/reindex.asciidoc:428 [source, python] ---- diff --git a/docs/examples/4113c57384aa37c58d11579e20c00760.asciidoc b/docs/examples/4113c57384aa37c58d11579e20c00760.asciidoc new file mode 100644 index 000000000..9e387857f --- /dev/null +++ b/docs/examples/4113c57384aa37c58d11579e20c00760.asciidoc @@ -0,0 +1,11 @@ +// docs/get.asciidoc:59 + +[source, python] +---- +resp = client.get( + index="my-index-000001", + id="0", + _source="false", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/7f465b7e8ed42df6c42251b4481e699e.asciidoc b/docs/examples/41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc similarity index 90% rename from docs/examples/7f465b7e8ed42df6c42251b4481e699e.asciidoc rename to docs/examples/41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc index c883deac6..03f1cd9d0 100644 --- a/docs/examples/7f465b7e8ed42df6c42251b4481e699e.asciidoc +++ b/docs/examples/41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc @@ -3,7 +3,7 @@ [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={ "mappings": { "properties": { diff --git a/docs/examples/015294a400986295039e52ebc62033be.asciidoc b/docs/examples/41dbd79f624b998d01c10921e9a35c4b.asciidoc similarity index 84% rename from docs/examples/015294a400986295039e52ebc62033be.asciidoc rename to docs/examples/41dbd79f624b998d01c10921e9a35c4b.asciidoc index ef06b0192..1d3d6190b 100644 --- a/docs/examples/015294a400986295039e52ebc62033be.asciidoc +++ b/docs/examples/41dbd79f624b998d01c10921e9a35c4b.asciidoc @@ -1,4 +1,4 @@ -// docs/update.asciidoc:251 +// docs/update.asciidoc:290 [source, python] ---- diff --git a/docs/examples/42744a175125df5be0ef77413bf8f608.asciidoc b/docs/examples/42744a175125df5be0ef77413bf8f608.asciidoc deleted file mode 100644 index 648902acf..000000000 --- a/docs/examples/42744a175125df5be0ef77413bf8f608.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/update-settings.asciidoc:73 - -[source, python] ----- -resp = client.indices.put_settings( - index="twitter", body={"index": {"refresh_interval": None}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/427f6b5c5376cbf0f71f242a60ca3d9e.asciidoc b/docs/examples/427f6b5c5376cbf0f71f242a60ca3d9e.asciidoc deleted file mode 100644 index f175666ab..000000000 --- a/docs/examples/427f6b5c5376cbf0f71f242a60ca3d9e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// indices/aliases.asciidoc:388 - -[source, python] ----- -resp = client.search(index="alias2", q="user:kimchy", routing=["2", "3"]) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/0a958e486ede3f519d48431ab689eded.asciidoc b/docs/examples/436d50b85fc8f0977d02059eec00719b.asciidoc similarity index 91% rename from docs/examples/0a958e486ede3f519d48431ab689eded.asciidoc rename to docs/examples/436d50b85fc8f0977d02059eec00719b.asciidoc index ba99dbd8d..3b2e7c75e 100644 --- a/docs/examples/0a958e486ede3f519d48431ab689eded.asciidoc +++ b/docs/examples/436d50b85fc8f0977d02059eec00719b.asciidoc @@ -1,4 +1,4 @@ -// docs/update.asciidoc:271 +// docs/update.asciidoc:309 [source, python] ---- diff --git a/docs/examples/44da736ce0e1587c1e7c45eee606ead7.asciidoc b/docs/examples/44da736ce0e1587c1e7c45eee606ead7.asciidoc new file mode 100644 index 000000000..3f25dc2cf --- /dev/null +++ b/docs/examples/44da736ce0e1587c1e7c45eee606ead7.asciidoc @@ -0,0 +1,13 @@ +// docs/update-by-query.asciidoc:403 + +[source, python] +---- +resp = client.update_by_query( + index="my-index-000001", + body={ + "script": {"source": "ctx._source.count++", "lang": "painless"}, + "query": {"term": {"user.id": "kimchy"}}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/4646764bf09911fee7d58630c72d3137.asciidoc b/docs/examples/4646764bf09911fee7d58630c72d3137.asciidoc deleted file mode 100644 index 8ac122830..000000000 --- a/docs/examples/4646764bf09911fee7d58630c72d3137.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:444 - -[source, python] ----- -resp = client.search( - body={ - "aggs": { - "genres": { - "terms": { - "script": { - "id": "my_script", - "params": {"field": "genre"}, - } - } - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/46658f00edc4865dfe472a392374cd0f.asciidoc b/docs/examples/46658f00edc4865dfe472a392374cd0f.asciidoc deleted file mode 100644 index fa9b2c89a..000000000 --- a/docs/examples/46658f00edc4865dfe472a392374cd0f.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/templates.asciidoc:249 - -[source, python] ----- -resp = client.indices.get_template( - name="template_1", filter_path="*.version", -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/60ee33f3acfdd0fe6f288ac77312c780.asciidoc b/docs/examples/472ec8c57fec8457e31fe6dd7f6e3713.asciidoc similarity index 86% rename from docs/examples/60ee33f3acfdd0fe6f288ac77312c780.asciidoc rename to docs/examples/472ec8c57fec8457e31fe6dd7f6e3713.asciidoc index 82b0f399f..5ad5d16e3 100644 --- a/docs/examples/60ee33f3acfdd0fe6f288ac77312c780.asciidoc +++ b/docs/examples/472ec8c57fec8457e31fe6dd7f6e3713.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:446 +// query-dsl/query-string-query.asciidoc:448 [source, python] ---- diff --git a/docs/examples/47b5ff897f26e9c943cee5c06034181d.asciidoc b/docs/examples/47b5ff897f26e9c943cee5c06034181d.asciidoc deleted file mode 100644 index 857fa6d5c..000000000 --- a/docs/examples/47b5ff897f26e9c943cee5c06034181d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/delete.asciidoc:71 - -[source, python] ----- -resp = client.delete(index="twitter", id="1", routing="kimchy") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/47bb632c6091ad0cd94bc660bdd309a5.asciidoc b/docs/examples/47bb632c6091ad0cd94bc660bdd309a5.asciidoc deleted file mode 100644 index 355a3a628..000000000 --- a/docs/examples/47bb632c6091ad0cd94bc660bdd309a5.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -// getting-started.asciidoc:512 - -[source, python] ----- -resp = client.search( - index="bank", - body={ - "query": { - "bool": { - "must": [{"match": {"age": "40"}}], - "must_not": [{"match": {"state": "ID"}}], - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/4824a823a830a2a5d990eacfd783ac22.asciidoc b/docs/examples/4824a823a830a2a5d990eacfd783ac22.asciidoc new file mode 100644 index 000000000..2ace6ec00 --- /dev/null +++ b/docs/examples/4824a823a830a2a5d990eacfd783ac22.asciidoc @@ -0,0 +1,22 @@ +// docs/delete-by-query.asciidoc:448 + +[source, python] +---- +resp = client.delete_by_query( + index="my-index-000001", + body={ + "slice": {"id": 0, "max": 2}, + "query": {"range": {"http.response.bytes": {"lt": 2000000}}}, + }, +) +print(resp) + +resp = client.delete_by_query( + index="my-index-000001", + body={ + "slice": {"id": 1, "max": 2}, + "query": {"range": {"http.response.bytes": {"lt": 2000000}}}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/4955bae30f265b9e436f82b015de6d7e.asciidoc b/docs/examples/4955bae30f265b9e436f82b015de6d7e.asciidoc new file mode 100644 index 000000000..0cac37e1b --- /dev/null +++ b/docs/examples/4955bae30f265b9e436f82b015de6d7e.asciidoc @@ -0,0 +1,21 @@ +// query-dsl/terms-query.asciidoc:193 + +[source, python] +---- +resp = client.search( + index="my-index-000001", + pretty=True, + body={ + "query": { + "terms": { + "color": { + "index": "my-index-000001", + "id": "2", + "path": "color", + } + } + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/fc8097bdfb6f3a4017bf4186ccca8a84.asciidoc b/docs/examples/4a2080ae55d931eb0643cc3eb91ec524.asciidoc similarity index 73% rename from docs/examples/fc8097bdfb6f3a4017bf4186ccca8a84.asciidoc rename to docs/examples/4a2080ae55d931eb0643cc3eb91ec524.asciidoc index 351738580..6947c1564 100644 --- a/docs/examples/fc8097bdfb6f3a4017bf4186ccca8a84.asciidoc +++ b/docs/examples/4a2080ae55d931eb0643cc3eb91ec524.asciidoc @@ -1,9 +1,9 @@ -// mapping/params/multi-fields.asciidoc:75 +// mapping/params/multi-fields.asciidoc:82 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={ "mappings": { "properties": { @@ -20,17 +20,21 @@ resp = client.indices.create( print(resp) resp = client.index( - index="my_index", id="1", body={"text": "quick brown fox"}, + index="my-index-000001", + id="1", + body={"text": "quick brown fox"}, ) print(resp) resp = client.index( - index="my_index", id="2", body={"text": "quick brown foxes"}, + index="my-index-000001", + id="2", + body={"text": "quick brown foxes"}, ) print(resp) resp = client.search( - index="my_index", + index="my-index-000001", body={ "query": { "multi_match": { diff --git a/docs/examples/4acf902c2598b2558f34f20c1744c433.asciidoc b/docs/examples/4acf902c2598b2558f34f20c1744c433.asciidoc deleted file mode 100644 index 410f24d46..000000000 --- a/docs/examples/4acf902c2598b2558f34f20c1744c433.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// docs/update-by-query.asciidoc:557 - -[source, python] ----- -resp = client.indices.refresh() -print(resp) - -resp = client.search( - index="twitter", size="0", q="extra:test", filter_path="hits.total", -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/c4b278ba293abd0d02a0b5ad1a99f84a.asciidoc b/docs/examples/4b1044259a6d777d87529eae25675005.asciidoc similarity index 64% rename from docs/examples/c4b278ba293abd0d02a0b5ad1a99f84a.asciidoc rename to docs/examples/4b1044259a6d777d87529eae25675005.asciidoc index 2e2c85850..01c60ca18 100644 --- a/docs/examples/c4b278ba293abd0d02a0b5ad1a99f84a.asciidoc +++ b/docs/examples/4b1044259a6d777d87529eae25675005.asciidoc @@ -1,4 +1,4 @@ -// docs/update-by-query.asciidoc:389 +// docs/update-by-query.asciidoc:444 [source, python] ---- @@ -11,6 +11,9 @@ resp = client.ingest.put_pipeline( ) print(resp) -resp = client.update_by_query(index="twitter", pipeline="set-foo") +resp = client.update_by_query( + index="my-index-000001", + pipeline="set-foo", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/4b90feb9d5d3dbfce424dac0341320b7.asciidoc b/docs/examples/4b90feb9d5d3dbfce424dac0341320b7.asciidoc deleted file mode 100644 index 8305d2776..000000000 --- a/docs/examples/4b90feb9d5d3dbfce424dac0341320b7.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// getting-started.asciidoc:461 - -[source, python] ----- -resp = client.search( - index="bank", - body={ - "query": {"match_all": {}}, - "sort": [{"account_number": "asc"}], - "from": 10, - "size": 10, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/028f6d6ac2594e20b78b8a8f8cbad49d.asciidoc b/docs/examples/4ba86373e13e106de044f190343be328.asciidoc similarity index 93% rename from docs/examples/028f6d6ac2594e20b78b8a8f8cbad49d.asciidoc rename to docs/examples/4ba86373e13e106de044f190343be328.asciidoc index 9f4bd482c..a9e11b1f6 100644 --- a/docs/examples/028f6d6ac2594e20b78b8a8f8cbad49d.asciidoc +++ b/docs/examples/4ba86373e13e106de044f190343be328.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:336 +// aggregations/bucket/terms-aggregation.asciidoc:365 [source, python] ---- diff --git a/docs/examples/4bc744b0f33b322741a8caf6d8d7d765.asciidoc b/docs/examples/4bc744b0f33b322741a8caf6d8d7d765.asciidoc new file mode 100644 index 000000000..fa34f145b --- /dev/null +++ b/docs/examples/4bc744b0f33b322741a8caf6d8d7d765.asciidoc @@ -0,0 +1,16 @@ +// docs/index_.asciidoc:594 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + op_type="create", + body={ + "@timestamp": "2099-11-15T13:12:00", + "message": "GET /search HTTP/1.1 200 1070000", + "user": {"id": "kimchy"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/e0d6e02b998bdea99c9c08dcc3630c5e.asciidoc b/docs/examples/4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc similarity index 100% rename from docs/examples/e0d6e02b998bdea99c9c08dcc3630c5e.asciidoc rename to docs/examples/4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc diff --git a/docs/examples/ec27afee074001b0e4e393611010842b.asciidoc b/docs/examples/4f3366fc26e7ea4de446dfa5cdec9683.asciidoc similarity index 92% rename from docs/examples/ec27afee074001b0e4e393611010842b.asciidoc rename to docs/examples/4f3366fc26e7ea4de446dfa5cdec9683.asciidoc index 630ce299d..cf42e9f4f 100644 --- a/docs/examples/ec27afee074001b0e4e393611010842b.asciidoc +++ b/docs/examples/4f3366fc26e7ea4de446dfa5cdec9683.asciidoc @@ -7,7 +7,7 @@ resp = client.search( "query": { "function_score": { "gauss": { - "date": { + "@timestamp": { "origin": "2013-09-17", "scale": "10d", "offset": "5d", diff --git a/docs/examples/506844befdc5691d835771bcbb1c1a60.asciidoc b/docs/examples/506844befdc5691d835771bcbb1c1a60.asciidoc deleted file mode 100644 index 0082edbad..000000000 --- a/docs/examples/506844befdc5691d835771bcbb1c1a60.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// getting-started.asciidoc:392 - -[source, python] ----- -resp = client.search( - index="bank", - body={"query": {"match_all": {}}, "sort": [{"account_number": "asc"}]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/50b5c0332949d2154c72b629b5fa6222.asciidoc b/docs/examples/50b5c0332949d2154c72b629b5fa6222.asciidoc new file mode 100644 index 000000000..0d320d06e --- /dev/null +++ b/docs/examples/50b5c0332949d2154c72b629b5fa6222.asciidoc @@ -0,0 +1,18 @@ +// indices/put-mapping.asciidoc:339 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + refresh="wait_for", + body={"user_id": 12345}, +) +print(resp) + +resp = client.index( + index="my-index-000001", + refresh="wait_for", + body={"user_id": 12346}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/aa6bfe54e2436eb668091fe31c2fbf4d.asciidoc b/docs/examples/51b40610ae05730b4c6afd25647d7ae0.asciidoc similarity index 78% rename from docs/examples/aa6bfe54e2436eb668091fe31c2fbf4d.asciidoc rename to docs/examples/51b40610ae05730b4c6afd25647d7ae0.asciidoc index 5f5345a09..c662e2685 100644 --- a/docs/examples/aa6bfe54e2436eb668091fe31c2fbf4d.asciidoc +++ b/docs/examples/51b40610ae05730b4c6afd25647d7ae0.asciidoc @@ -1,9 +1,9 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:502 +// aggregations/bucket/datehistogram-aggregation.asciidoc:488 [source, python] ---- resp = client.index( - index="my_index", + index="my-index-000001", id="1", refresh=True, body={"date": "2015-10-01T05:30:00Z"}, @@ -11,7 +11,7 @@ resp = client.index( print(resp) resp = client.index( - index="my_index", + index="my-index-000001", id="2", refresh=True, body={"date": "2015-10-01T06:30:00Z"}, @@ -19,7 +19,7 @@ resp = client.index( print(resp) resp = client.search( - index="my_index", + index="my-index-000001", size="0", body={ "aggs": { diff --git a/docs/examples/5203560189ccab7122c03500147701ef.asciidoc b/docs/examples/5203560189ccab7122c03500147701ef.asciidoc new file mode 100644 index 000000000..3e0285303 --- /dev/null +++ b/docs/examples/5203560189ccab7122c03500147701ef.asciidoc @@ -0,0 +1,6 @@ +// aggregations/bucket/datehistogram-aggregation.asciidoc:568 + +[source, python] +---- + +---- \ No newline at end of file diff --git a/docs/examples/5275842787967b6db876025f4a1c6942.asciidoc b/docs/examples/5275842787967b6db876025f4a1c6942.asciidoc index 35f7bc748..20106e870 100644 --- a/docs/examples/5275842787967b6db876025f4a1c6942.asciidoc +++ b/docs/examples/5275842787967b6db876025f4a1c6942.asciidoc @@ -1,4 +1,4 @@ -// search/suggesters.asciidoc:127 +// search/suggesters.asciidoc:122 [source, python] ---- diff --git a/docs/examples/52a87b81e4e0b6b11e23e85db1602a63.asciidoc b/docs/examples/52a87b81e4e0b6b11e23e85db1602a63.asciidoc deleted file mode 100644 index 322a7c23d..000000000 --- a/docs/examples/52a87b81e4e0b6b11e23e85db1602a63.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// docs/update-by-query.asciidoc:300 - -[source, python] ----- -resp = client.update_by_query( - index="twitter", - conflicts="proceed", - body={"query": {"term": {"user": "kimchy"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/52b2bfbdd78f8283b6f4891c48013237.asciidoc b/docs/examples/52b2bfbdd78f8283b6f4891c48013237.asciidoc deleted file mode 100644 index 7899d2df9..000000000 --- a/docs/examples/52b2bfbdd78f8283b6f4891c48013237.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// docs/reindex.asciidoc:631 - -[source, python] ----- -resp = client.reindex( - body={ - "max_docs": 1, - "source": {"index": "twitter"}, - "dest": {"index": "new_twitter"}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/52c7e4172a446c394210a07c464c57d2.asciidoc b/docs/examples/52c7e4172a446c394210a07c464c57d2.asciidoc index 3e2766914..431168efb 100644 --- a/docs/examples/52c7e4172a446c394210a07c464c57d2.asciidoc +++ b/docs/examples/52c7e4172a446c394210a07c464c57d2.asciidoc @@ -1,9 +1,10 @@ -// docs/delete-by-query.asciidoc:572 +// docs/delete-by-query.asciidoc:606 [source, python] ---- resp = client.delete_by_query_rethrottle( - task_id="r1A2WoRbTwKZ516z6NEs5A:36619", requests_per_second="-1", + task_id="r1A2WoRbTwKZ516z6NEs5A:36619", + requests_per_second="-1", ) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/a71c438cc4df1cafe3109ccff475afdb.asciidoc b/docs/examples/52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc similarity index 84% rename from docs/examples/a71c438cc4df1cafe3109ccff475afdb.asciidoc rename to docs/examples/52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc index 0452c2740..395ee4537 100644 --- a/docs/examples/a71c438cc4df1cafe3109ccff475afdb.asciidoc +++ b/docs/examples/52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc @@ -1,9 +1,9 @@ -// mapping/types/numeric.asciidoc:22 +// mapping/types/numeric.asciidoc:23 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={ "mappings": { "properties": { diff --git a/docs/examples/c32a3f8071d87f0a3f5a78e07fe7a669.asciidoc b/docs/examples/5330191ec9f11281ebf6867bf11c58ae.asciidoc similarity index 68% rename from docs/examples/c32a3f8071d87f0a3f5a78e07fe7a669.asciidoc rename to docs/examples/5330191ec9f11281ebf6867bf11c58ae.asciidoc index df67e1c40..57ab4c2e7 100644 --- a/docs/examples/c32a3f8071d87f0a3f5a78e07fe7a669.asciidoc +++ b/docs/examples/5330191ec9f11281ebf6867bf11c58ae.asciidoc @@ -1,9 +1,9 @@ -// docs/delete-by-query.asciidoc:376 +// docs/delete-by-query.asciidoc:394 [source, python] ---- resp = client.delete_by_query( - index="twitter", + index="my-index-000001", routing="1", body={"query": {"range": {"age": {"gte": 10}}}}, ) diff --git a/docs/examples/53d938c754f36a912fcbe6473abb463f.asciidoc b/docs/examples/53d938c754f36a912fcbe6473abb463f.asciidoc deleted file mode 100644 index 37c150005..000000000 --- a/docs/examples/53d938c754f36a912fcbe6473abb463f.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/put-mapping.asciidoc:465 - -[source, python] ----- -resp = client.reindex( - body={"source": {"index": "users"}, "dest": {"index": "new_users"}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/93f1bdd72e79827dcf9a34efa02fd977.asciidoc b/docs/examples/54a215d242ab65123b09e9dfb71bcbbf.asciidoc similarity index 80% rename from docs/examples/93f1bdd72e79827dcf9a34efa02fd977.asciidoc rename to docs/examples/54a215d242ab65123b09e9dfb71bcbbf.asciidoc index e342f7eeb..96f693a65 100644 --- a/docs/examples/93f1bdd72e79827dcf9a34efa02fd977.asciidoc +++ b/docs/examples/54a215d242ab65123b09e9dfb71bcbbf.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:224 +// aggregations/bucket/terms-aggregation.asciidoc:237 [source, python] ---- diff --git a/docs/examples/54a770f053f3225ea0d1e34334232411.asciidoc b/docs/examples/54a770f053f3225ea0d1e34334232411.asciidoc deleted file mode 100644 index e9e85efbb..000000000 --- a/docs/examples/54a770f053f3225ea0d1e34334232411.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/update-by-query.asciidoc:336 - -[source, python] ----- -resp = client.update_by_query(index="twitter", scroll_size="100") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b214942b938e47f2c486e523546cb574.asciidoc b/docs/examples/5553cf7a02c22f616cd994747f2dd5a5.asciidoc similarity index 92% rename from docs/examples/b214942b938e47f2c486e523546cb574.asciidoc rename to docs/examples/5553cf7a02c22f616cd994747f2dd5a5.asciidoc index 20b694167..274b79804 100644 --- a/docs/examples/b214942b938e47f2c486e523546cb574.asciidoc +++ b/docs/examples/5553cf7a02c22f616cd994747f2dd5a5.asciidoc @@ -3,7 +3,7 @@ [source, python] ---- resp = client.search( - index="my_index", + index="my-index-000001", body={ "query": { "bool": { diff --git a/docs/examples/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc b/docs/examples/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc new file mode 100644 index 000000000..e58905f00 --- /dev/null +++ b/docs/examples/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc @@ -0,0 +1,10 @@ +// indices/put-mapping.asciidoc:13 + +[source, python] +---- +resp = client.indices.put_mapping( + index="my-index-000001", + body={"properties": {"email": {"type": "keyword"}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/3cd50a789b8e1f0ebbbc53a8d7ecf656.asciidoc b/docs/examples/56a903530990313b753b1be33578997a.asciidoc similarity index 88% rename from docs/examples/3cd50a789b8e1f0ebbbc53a8d7ecf656.asciidoc rename to docs/examples/56a903530990313b753b1be33578997a.asciidoc index 216d2ba98..f7131ab2f 100644 --- a/docs/examples/3cd50a789b8e1f0ebbbc53a8d7ecf656.asciidoc +++ b/docs/examples/56a903530990313b753b1be33578997a.asciidoc @@ -1,12 +1,12 @@ -// query-dsl/multi-match-query.asciidoc:438 +// query-dsl/multi-match-query.asciidoc:448 [source, python] ---- resp = client.search( body={ "query": { - "bool": { - "should": [ + "dis_max": { + "queries": [ { "multi_match": { "query": "Will Smith", diff --git a/docs/examples/5925c23a173a63bdb30b458248d1df76.asciidoc b/docs/examples/5925c23a173a63bdb30b458248d1df76.asciidoc deleted file mode 100644 index b048b184b..000000000 --- a/docs/examples/5925c23a173a63bdb30b458248d1df76.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// api-conventions.asciidoc:407 - -[source, python] ----- -resp = client.indices.get_settings(index="twitter", flat_settings="false") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/5b58007f10700ec7934580f034404652.asciidoc b/docs/examples/5b58007f10700ec7934580f034404652.asciidoc new file mode 100644 index 000000000..87a4d0df4 --- /dev/null +++ b/docs/examples/5b58007f10700ec7934580f034404652.asciidoc @@ -0,0 +1,15 @@ +// docs/index_.asciidoc:579 + +[source, python] +---- +resp = client.create( + index="my-index-000001", + id="1", + body={ + "@timestamp": "2099-11-15T13:12:00", + "message": "GET /search HTTP/1.1 200 1070000", + "user": {"id": "kimchy"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc b/docs/examples/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc new file mode 100644 index 000000000..c8cee2b4d --- /dev/null +++ b/docs/examples/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc @@ -0,0 +1,17 @@ +// indices/get-mapping.asciidoc:79 + +[source, python] +---- +resp = client.indices.get_mapping( + index="*", +) +print(resp) + +resp = client.indices.get_mapping( + index="_all", +) +print(resp) + +resp = client.indices.get_mapping() +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/5be23858b35043fcb7b50fe36b873e6e.asciidoc b/docs/examples/5be23858b35043fcb7b50fe36b873e6e.asciidoc deleted file mode 100644 index 04ca4e84f..000000000 --- a/docs/examples/5be23858b35043fcb7b50fe36b873e6e.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/put-mapping.asciidoc:11 - -[source, python] ----- -resp = client.indices.put_mapping( - index="twitter", body={"properties": {"email": {"type": "keyword"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/5c2f486c27bd5346e512265f93375d16.asciidoc b/docs/examples/5c2f486c27bd5346e512265f93375d16.asciidoc index f1121699f..a7af294d8 100644 --- a/docs/examples/5c2f486c27bd5346e512265f93375d16.asciidoc +++ b/docs/examples/5c2f486c27bd5346e512265f93375d16.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/range-query.asciidoc:219 +// query-dsl/range-query.asciidoc:241 [source, python] ---- diff --git a/docs/examples/df17f920b0deab3529b98df88b781f55.asciidoc b/docs/examples/5c6fbeac20dc23b613847f35d431ecab.asciidoc similarity index 100% rename from docs/examples/df17f920b0deab3529b98df88b781f55.asciidoc rename to docs/examples/5c6fbeac20dc23b613847f35d431ecab.asciidoc diff --git a/docs/examples/6799d132c1c7ca3970763acde2337ef9.asciidoc b/docs/examples/5d03bb385904d20c5323885706738459.asciidoc similarity index 55% rename from docs/examples/6799d132c1c7ca3970763acde2337ef9.asciidoc rename to docs/examples/5d03bb385904d20c5323885706738459.asciidoc index 2e76ff8bc..4fe59fe3a 100644 --- a/docs/examples/6799d132c1c7ca3970763acde2337ef9.asciidoc +++ b/docs/examples/5d03bb385904d20c5323885706738459.asciidoc @@ -1,11 +1,11 @@ -// indices/aliases.asciidoc:249 +// indices/aliases.asciidoc:10 [source, python] ---- resp = client.indices.update_aliases( body={ "actions": [ - {"add": {"index": "test*", "alias": "all_test_indices"}} + {"add": {"index": "my-data-stream", "alias": "my-alias"}} ] }, ) diff --git a/docs/examples/5d32279dcd52b22d9e1178a02a3ad957.asciidoc b/docs/examples/5d32279dcd52b22d9e1178a02a3ad957.asciidoc deleted file mode 100644 index cdfee5c5e..000000000 --- a/docs/examples/5d32279dcd52b22d9e1178a02a3ad957.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// search.asciidoc:18 - -[source, python] ----- -resp = client.index( - index="twitter", - routing="kimchy", - body={ - "user": "kimchy", - "post_date": "2009-11-15T14:12:12", - "message": "trying out Elasticsearch", - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc b/docs/examples/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc index 7f6f82adf..de7f4c45a 100644 --- a/docs/examples/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc +++ b/docs/examples/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:549 +// aggregations/bucket/terms-aggregation.asciidoc:600 [source, python] ---- diff --git a/docs/examples/5da6efd5b038ada64c9e853c88c1ec47.asciidoc b/docs/examples/5da6efd5b038ada64c9e853c88c1ec47.asciidoc index 7ce072546..265c6cdf4 100644 --- a/docs/examples/5da6efd5b038ada64c9e853c88c1ec47.asciidoc +++ b/docs/examples/5da6efd5b038ada64c9e853c88c1ec47.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:113 +// query-dsl/multi-match-query.asciidoc:114 [source, python] ---- diff --git a/docs/examples/43af86de5e49aa06070092fffc138208.asciidoc b/docs/examples/5dfe24287bb930ad33345caf092a004b.asciidoc similarity index 52% rename from docs/examples/43af86de5e49aa06070092fffc138208.asciidoc rename to docs/examples/5dfe24287bb930ad33345caf092a004b.asciidoc index 94ee8c443..99da7c1b3 100644 --- a/docs/examples/43af86de5e49aa06070092fffc138208.asciidoc +++ b/docs/examples/5dfe24287bb930ad33345caf092a004b.asciidoc @@ -3,7 +3,9 @@ [source, python] ---- resp = client.search( - body={"query": {"bool": {"must_not": {"exists": {"field": "user"}}}}}, + body={ + "query": {"bool": {"must_not": {"exists": {"field": "user.id"}}}} + }, ) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/5eabcdbf61bfcb484dc694f25c2bba36.asciidoc b/docs/examples/5eabcdbf61bfcb484dc694f25c2bba36.asciidoc deleted file mode 100644 index 7899ed44d..000000000 --- a/docs/examples/5eabcdbf61bfcb484dc694f25c2bba36.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// docs/get.asciidoc:323 - -[source, python] ----- -resp = client.index( - index="twitter", id="1", body={"counter": 1, "tags": ["red"]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1f6fe6833686e38c3711c6f2aa00a078.asciidoc b/docs/examples/5f1ed9cfdc149763b444acfbe10b0e16.asciidoc similarity index 77% rename from docs/examples/1f6fe6833686e38c3711c6f2aa00a078.asciidoc rename to docs/examples/5f1ed9cfdc149763b444acfbe10b0e16.asciidoc index a760ef1e5..df119127d 100644 --- a/docs/examples/1f6fe6833686e38c3711c6f2aa00a078.asciidoc +++ b/docs/examples/5f1ed9cfdc149763b444acfbe10b0e16.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:327 +// indices/put-mapping.asciidoc:265 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={ "mappings": { "properties": { diff --git a/docs/examples/5f210f74725ea0c9265190346edfa246.asciidoc b/docs/examples/5f210f74725ea0c9265190346edfa246.asciidoc deleted file mode 100644 index 3811261ab..000000000 --- a/docs/examples/5f210f74725ea0c9265190346edfa246.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// indices/aliases.asciidoc:232 - -[source, python] ----- -resp = client.indices.update_aliases( - body={ - "actions": [ - {"add": {"indices": ["test1", "test2"], "alias": "alias1"}} - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc b/docs/examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc deleted file mode 100644 index 3b1e8dfc2..000000000 --- a/docs/examples/5f3549ac7fee94682ca0d7439eebdd2a.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// search/request/sort.asciidoc:211 - -[source, python] ----- -resp = client.search( - index=["index_long", "index_double"], - body={"sort": [{"field": {"numeric_type": "date_nanos"}}]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/609260ad1d5998be2ca09ff1fe237efa.asciidoc b/docs/examples/609260ad1d5998be2ca09ff1fe237efa.asciidoc deleted file mode 100644 index 2b1797414..000000000 --- a/docs/examples/609260ad1d5998be2ca09ff1fe237efa.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// mapping.asciidoc:214 - -[source, python] ----- -resp = client.indices.get_mapping(index="my-index") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1c23507edd7a3c18538b68223378e4ab.asciidoc b/docs/examples/60f889fbed5df3185444f7015b48ed76.asciidoc similarity index 55% rename from docs/examples/1c23507edd7a3c18538b68223378e4ab.asciidoc rename to docs/examples/60f889fbed5df3185444f7015b48ed76.asciidoc index caddb0f10..5c91acda8 100644 --- a/docs/examples/1c23507edd7a3c18538b68223378e4ab.asciidoc +++ b/docs/examples/60f889fbed5df3185444f7015b48ed76.asciidoc @@ -2,6 +2,8 @@ [source, python] ---- -resp = client.indices.create(index="twitter") +resp = client.indices.create( + index="my-index-000001", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/621665fdbd7fc103c09bfeed28b67b1a.asciidoc b/docs/examples/621665fdbd7fc103c09bfeed28b67b1a.asciidoc deleted file mode 100644 index 0d266e9a1..000000000 --- a/docs/examples/621665fdbd7fc103c09bfeed28b67b1a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// api-conventions.asciidoc:298 - -[source, python] ----- -resp = client.count(filter_path="-_shards") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/625dc94df1f9affb49a082fd99d41620.asciidoc b/docs/examples/625dc94df1f9affb49a082fd99d41620.asciidoc deleted file mode 100644 index 6694914f2..000000000 --- a/docs/examples/625dc94df1f9affb49a082fd99d41620.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// docs/index_.asciidoc:245 - -[source, python] ----- -resp = client.index( - index="twitter", - routing="kimchy", - body={ - "user": "kimchy", - "post_date": "2009-11-15T14:12:12", - "message": "trying out Elasticsearch", - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/633c8a9fc57268979d8735c557705809.asciidoc b/docs/examples/633c8a9fc57268979d8735c557705809.asciidoc new file mode 100644 index 000000000..dad960817 --- /dev/null +++ b/docs/examples/633c8a9fc57268979d8735c557705809.asciidoc @@ -0,0 +1,22 @@ +// mapping/types/keyword.asciidoc:219 + +[source, python] +---- +resp = client.indices.create( + index="idx", + body={ + "mappings": { + "_source": {"mode": "synthetic"}, + "properties": {"kwd": {"type": "keyword", "store": True}}, + } + }, +) +print(resp) + +resp = client.index( + index="idx", + id="1", + body={"kwd": ["foo", "foo", "bar", "baz"]}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/e5d2172b524332196cac0f031c043659.asciidoc b/docs/examples/63cc960215ae83b359c12df3c0993bfa.asciidoc similarity index 74% rename from docs/examples/e5d2172b524332196cac0f031c043659.asciidoc rename to docs/examples/63cc960215ae83b359c12df3c0993bfa.asciidoc index 80be453e8..f227287f5 100644 --- a/docs/examples/e5d2172b524332196cac0f031c043659.asciidoc +++ b/docs/examples/63cc960215ae83b359c12df3c0993bfa.asciidoc @@ -1,9 +1,9 @@ -// indices/create-index.asciidoc:81 +// indices/create-index.asciidoc:130 [source, python] ---- resp = client.indices.create( - index="twitter", + index="my-index-000001", body={ "settings": { "index": {"number_of_shards": 3, "number_of_replicas": 2} diff --git a/docs/examples/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc b/docs/examples/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc new file mode 100644 index 000000000..22e894a4c --- /dev/null +++ b/docs/examples/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc @@ -0,0 +1,22 @@ +// mapping/types/keyword.asciidoc:189 + +[source, python] +---- +resp = client.indices.create( + index="idx", + body={ + "mappings": { + "_source": {"mode": "synthetic"}, + "properties": {"kwd": {"type": "keyword"}}, + } + }, +) +print(resp) + +resp = client.index( + index="idx", + id="1", + body={"kwd": ["foo", "foo", "bar", "baz"]}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/6be70810d6ebd6f09d8a49f9df847765.asciidoc b/docs/examples/641f75862c70e25e79d249d9e0a79f03.asciidoc similarity index 94% rename from docs/examples/6be70810d6ebd6f09d8a49f9df847765.asciidoc rename to docs/examples/641f75862c70e25e79d249d9e0a79f03.asciidoc index 1cbc431a7..91f2899c9 100644 --- a/docs/examples/6be70810d6ebd6f09d8a49f9df847765.asciidoc +++ b/docs/examples/641f75862c70e25e79d249d9e0a79f03.asciidoc @@ -3,7 +3,7 @@ [source, python] ---- resp = client.search( - index="my_index", + index="my-index-000001", body={ "query": { "nested": { diff --git a/docs/examples/645136747d37368a14ab34de8bd046c6.asciidoc b/docs/examples/645136747d37368a14ab34de8bd046c6.asciidoc deleted file mode 100644 index 60c30b4a4..000000000 --- a/docs/examples/645136747d37368a14ab34de8bd046c6.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// mapping/types/date.asciidoc:35 - -[source, python] ----- -resp = client.indices.create( - index="my_index", - body={"mappings": {"properties": {"date": {"type": "date"}}}}, -) -print(resp) - -resp = client.index(index="my_index", id="1", body={"date": "2015-01-01"}) -print(resp) - -resp = client.index( - index="my_index", id="2", body={"date": "2015-01-01T12:10:30Z"}, -) -print(resp) - -resp = client.index( - index="my_index", id="3", body={"date": 1420070400001}, -) -print(resp) - -resp = client.search(index="my_index", body={"sort": {"date": "asc"}}) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/645796e8047967ca4a7635a22a876f4c.asciidoc b/docs/examples/645796e8047967ca4a7635a22a876f4c.asciidoc deleted file mode 100644 index 39c8e8a6d..000000000 --- a/docs/examples/645796e8047967ca4a7635a22a876f4c.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// getting-started.asciidoc:691 - -[source, python] ----- -resp = client.search( - index="bank", - body={ - "size": 0, - "aggs": { - "group_by_state": { - "terms": { - "field": "state.keyword", - "order": {"average_balance": "desc"}, - }, - "aggs": {"average_balance": {"avg": {"field": "balance"}}}, - } - }, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/6464124d1677f4552ddddd95a340ca3a.asciidoc b/docs/examples/6464124d1677f4552ddddd95a340ca3a.asciidoc deleted file mode 100644 index ce49a53dd..000000000 --- a/docs/examples/6464124d1677f4552ddddd95a340ca3a.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -// api-conventions.asciidoc:344 - -[source, python] ----- -resp = client.index( - index="library", - refresh=True, - body={"title": "Book #1", "rating": 200.1}, -) -print(resp) - -resp = client.index( - index="library", - refresh=True, - body={"title": "Book #2", "rating": 1.7}, -) -print(resp) - -resp = client.index( - index="library", - refresh=True, - body={"title": "Book #3", "rating": 0.1}, -) -print(resp) - -resp = client.search( - filter_path="hits.hits._source", _source="title", sort="rating:desc", -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/67ceac4bf2d9ac7cc500390544cdcb41.asciidoc b/docs/examples/64aff98cf477555e7411714c17006572.asciidoc similarity index 50% rename from docs/examples/67ceac4bf2d9ac7cc500390544cdcb41.asciidoc rename to docs/examples/64aff98cf477555e7411714c17006572.asciidoc index 734379bcd..017db0ff6 100644 --- a/docs/examples/67ceac4bf2d9ac7cc500390544cdcb41.asciidoc +++ b/docs/examples/64aff98cf477555e7411714c17006572.asciidoc @@ -1,11 +1,11 @@ -// query-dsl/range-query.asciidoc:157 +// query-dsl/range-query.asciidoc:150 [source, python] ---- resp = client.search( body={ "query": { - "range": {"timestamp": {"gte": "now-1d/d", "lt": "now/d"}} + "range": {"timestamp": {"gte": "now-1d/d", "lte": "now/d"}} } }, ) diff --git a/docs/examples/64b9baa6d7556b960b29698f3383aa31.asciidoc b/docs/examples/64b9baa6d7556b960b29698f3383aa31.asciidoc index ed43be02b..3373789a5 100644 --- a/docs/examples/64b9baa6d7556b960b29698f3383aa31.asciidoc +++ b/docs/examples/64b9baa6d7556b960b29698f3383aa31.asciidoc @@ -1,4 +1,4 @@ -// docs/reindex.asciidoc:967 +// docs/reindex.asciidoc:1062 [source, python] ---- diff --git a/docs/examples/7f28f8ae8fcdbd807dadde0b5b007a6d.asciidoc b/docs/examples/653c0d0ef146c997ef6bc6450d4f5f94.asciidoc similarity index 85% rename from docs/examples/7f28f8ae8fcdbd807dadde0b5b007a6d.asciidoc rename to docs/examples/653c0d0ef146c997ef6bc6450d4f5f94.asciidoc index 86f934193..566b66519 100644 --- a/docs/examples/7f28f8ae8fcdbd807dadde0b5b007a6d.asciidoc +++ b/docs/examples/653c0d0ef146c997ef6bc6450d4f5f94.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:641 +// aggregations/bucket/terms-aggregation.asciidoc:700 [source, python] ---- diff --git a/docs/examples/67bba546d835bca8f31df13e3587c348.asciidoc b/docs/examples/67bba546d835bca8f31df13e3587c348.asciidoc deleted file mode 100644 index 4c649a448..000000000 --- a/docs/examples/67bba546d835bca8f31df13e3587c348.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// indices/aliases.asciidoc:447 - -[source, python] ----- -resp = client.get(index="test", id="1") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/68721288dc9ad8aa1b55099b4d303051.asciidoc b/docs/examples/68721288dc9ad8aa1b55099b4d303051.asciidoc index eab68a52d..ffe8f7ba4 100644 --- a/docs/examples/68721288dc9ad8aa1b55099b4d303051.asciidoc +++ b/docs/examples/68721288dc9ad8aa1b55099b4d303051.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:524 +// query-dsl/multi-match-query.asciidoc:534 [source, python] ---- diff --git a/docs/examples/68738b4fd0dda177022be45be95b4c84.asciidoc b/docs/examples/68738b4fd0dda177022be45be95b4c84.asciidoc index 5732d47db..12900a524 100644 --- a/docs/examples/68738b4fd0dda177022be45be95b4c84.asciidoc +++ b/docs/examples/68738b4fd0dda177022be45be95b4c84.asciidoc @@ -1,9 +1,10 @@ -// docs/reindex.asciidoc:170 +// docs/reindex.asciidoc:202 [source, python] ---- resp = client.reindex_rethrottle( - task_id="r1A2WoRbTwKZ516z6NEs5A:36619", requests_per_second="-1", + task_id="r1A2WoRbTwKZ516z6NEs5A:36619", + requests_per_second="-1", ) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc b/docs/examples/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc new file mode 100644 index 000000000..5cedcfe10 --- /dev/null +++ b/docs/examples/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc @@ -0,0 +1,11 @@ +// docs/get.asciidoc:354 + +[source, python] +---- +resp = client.get( + index="my-index-000001", + id="1", + stored_fields=["tags", "counter"], +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/69c07cfdf8054c301cd6186c5d71aa02.asciidoc b/docs/examples/69c07cfdf8054c301cd6186c5d71aa02.asciidoc new file mode 100644 index 000000000..cbeac05c0 --- /dev/null +++ b/docs/examples/69c07cfdf8054c301cd6186c5d71aa02.asciidoc @@ -0,0 +1,9 @@ +// docs/update-by-query.asciidoc:344 + +[source, python] +---- +resp = client.update_by_query( + index=["my-index-000001", "my-index-000002"], +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/6a81d00f0d73bc5985e76b3cadab645e.asciidoc b/docs/examples/6a81d00f0d73bc5985e76b3cadab645e.asciidoc deleted file mode 100644 index b4edd7133..000000000 --- a/docs/examples/6a81d00f0d73bc5985e76b3cadab645e.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// mapping/params/fielddata.asciidoc:117 - -[source, python] ----- -resp = client.indices.create( - index="my_index", - body={ - "mappings": { - "properties": { - "tag": { - "type": "text", - "fielddata": True, - "fielddata_frequency_filter": { - "min": 0.001, - "max": 0.1, - "min_segment_size": 500, - }, - } - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/5271f4ff29bb48838396e5a674664ee0.asciidoc b/docs/examples/6aa2941855d13f365f70aa8767ecb137.asciidoc similarity index 70% rename from docs/examples/5271f4ff29bb48838396e5a674664ee0.asciidoc rename to docs/examples/6aa2941855d13f365f70aa8767ecb137.asciidoc index ad1c722df..feb9728e7 100644 --- a/docs/examples/5271f4ff29bb48838396e5a674664ee0.asciidoc +++ b/docs/examples/6aa2941855d13f365f70aa8767ecb137.asciidoc @@ -3,7 +3,7 @@ [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={ "mappings": { "properties": { @@ -17,14 +17,22 @@ resp = client.indices.create( ) print(resp) -resp = client.index(index="my_index", id="1", body={"city": "New York"}) +resp = client.index( + index="my-index-000001", + id="1", + body={"city": "New York"}, +) print(resp) -resp = client.index(index="my_index", id="2", body={"city": "York"}) +resp = client.index( + index="my-index-000001", + id="2", + body={"city": "York"}, +) print(resp) resp = client.search( - index="my_index", + index="my-index-000001", body={ "query": {"match": {"city": "york"}}, "sort": {"city.raw": "asc"}, diff --git a/docs/examples/5043b83a89091fa00edb341ddf7ba370.asciidoc b/docs/examples/6b0288acb739c4667d41339e5100c327.asciidoc similarity index 100% rename from docs/examples/5043b83a89091fa00edb341ddf7ba370.asciidoc rename to docs/examples/6b0288acb739c4667d41339e5100c327.asciidoc diff --git a/docs/examples/6b1e837a8469eca2d03d5c36f5910f34.asciidoc b/docs/examples/6b1e837a8469eca2d03d5c36f5910f34.asciidoc new file mode 100644 index 000000000..a4e9e2207 --- /dev/null +++ b/docs/examples/6b1e837a8469eca2d03d5c36f5910f34.asciidoc @@ -0,0 +1,20 @@ +// aggregations/bucket/filter-aggregation.asciidoc:13 + +[source, python] +---- +resp = client.search( + index="sales", + size="0", + filter_path="aggregations", + body={ + "aggs": { + "avg_price": {"avg": {"field": "price"}}, + "t_shirts": { + "filter": {"term": {"type": "t-shirt"}}, + "aggs": {"avg_price": {"avg": {"field": "price"}}}, + }, + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/a116949e446f34dc25ae57d4b703d0c1.asciidoc b/docs/examples/6b77795e9249c8d9865f7a49fd86a863.asciidoc similarity index 100% rename from docs/examples/a116949e446f34dc25ae57d4b703d0c1.asciidoc rename to docs/examples/6b77795e9249c8d9865f7a49fd86a863.asciidoc diff --git a/docs/examples/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc b/docs/examples/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc index 9c42018f4..4ee23b72d 100644 --- a/docs/examples/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc +++ b/docs/examples/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:228 +// query-dsl/multi-match-query.asciidoc:232 [source, python] ---- diff --git a/docs/examples/ec473de07fe89bcbac1f8e278617fe46.asciidoc b/docs/examples/6c00dae1a456ae5e854e98e895dca2ab.asciidoc similarity index 84% rename from docs/examples/ec473de07fe89bcbac1f8e278617fe46.asciidoc rename to docs/examples/6c00dae1a456ae5e854e98e895dca2ab.asciidoc index 112391a9b..141eb58d0 100644 --- a/docs/examples/ec473de07fe89bcbac1f8e278617fe46.asciidoc +++ b/docs/examples/6c00dae1a456ae5e854e98e895dca2ab.asciidoc @@ -9,7 +9,7 @@ resp = client.search( "query": {"match": {"message": "elasticsearch"}}, "script_score": { "script": { - "source": "Math.log(2 + doc['likes'].value)" + "source": "Math.log(2 + doc['my-int'].value)" } }, } diff --git a/docs/examples/54092c8c646133f5dbbc047990dd458d.asciidoc b/docs/examples/6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc similarity index 94% rename from docs/examples/54092c8c646133f5dbbc047990dd458d.asciidoc rename to docs/examples/6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc index 11cf94e79..e780e8d5f 100644 --- a/docs/examples/54092c8c646133f5dbbc047990dd458d.asciidoc +++ b/docs/examples/6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/nested-query.asciidoc:133 +// query-dsl/nested-query.asciidoc:139 [source, python] ---- diff --git a/docs/examples/b919f88e6f47a40d5793479440a90ba6.asciidoc b/docs/examples/6cd083045bf06e80b83889a939a18451.asciidoc similarity index 92% rename from docs/examples/b919f88e6f47a40d5793479440a90ba6.asciidoc rename to docs/examples/6cd083045bf06e80b83889a939a18451.asciidoc index 4a7f635c1..a685eae37 100644 --- a/docs/examples/b919f88e6f47a40d5793479440a90ba6.asciidoc +++ b/docs/examples/6cd083045bf06e80b83889a939a18451.asciidoc @@ -3,13 +3,13 @@ [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={"mappings": {"properties": {"user": {"type": "nested"}}}}, ) print(resp) resp = client.index( - index="my_index", + index="my-index-000001", id="1", body={ "group": "fans", @@ -22,7 +22,7 @@ resp = client.index( print(resp) resp = client.search( - index="my_index", + index="my-index-000001", body={ "query": { "nested": { @@ -42,7 +42,7 @@ resp = client.search( print(resp) resp = client.search( - index="my_index", + index="my-index-000001", body={ "query": { "nested": { diff --git a/docs/examples/6d1e75312a28a5ba23837abf768f2510.asciidoc b/docs/examples/6d1e75312a28a5ba23837abf768f2510.asciidoc deleted file mode 100644 index 36c6cc8a3..000000000 --- a/docs/examples/6d1e75312a28a5ba23837abf768f2510.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// api-conventions.asciidoc:603 - -[source, python] ----- -resp = client.search( - index="twitter", size="surprise_me", error_trace="true", -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/81c9aa2678d6166a9662ddf2c011a6a5.asciidoc b/docs/examples/6e000496a1fa8b57148518eaad692f35.asciidoc similarity index 55% rename from docs/examples/81c9aa2678d6166a9662ddf2c011a6a5.asciidoc rename to docs/examples/6e000496a1fa8b57148518eaad692f35.asciidoc index 79c62c7d7..da16c1ea1 100644 --- a/docs/examples/81c9aa2678d6166a9662ddf2c011a6a5.asciidoc +++ b/docs/examples/6e000496a1fa8b57148518eaad692f35.asciidoc @@ -2,6 +2,8 @@ [source, python] ---- -resp = client.search(body={"query": {"match_none": {}}}) +resp = client.search( + body={"query": {"match_none": {}}}, +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/6f097c298a7abf4c032c4314920c49c8.asciidoc b/docs/examples/6f097c298a7abf4c032c4314920c49c8.asciidoc deleted file mode 100644 index f864883cf..000000000 --- a/docs/examples/6f097c298a7abf4c032c4314920c49c8.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// docs/reindex.asciidoc:653 - -[source, python] ----- -resp = client.reindex( - body={ - "source": {"index": ["twitter", "blog"]}, - "dest": {"index": "all_together"}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc b/docs/examples/6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc deleted file mode 100644 index 7e2373519..000000000 --- a/docs/examples/6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:669 - -[source, python] ----- -resp = client.search( - index="sales", - size="0", - body={ - "aggs": { - "dayOfWeek": { - "terms": { - "script": { - "lang": "painless", - "source": "doc['date'].value.dayOfWeekEnum.value", - } - } - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/710c7871f20f176d51209b1574b0d61b.asciidoc b/docs/examples/710c7871f20f176d51209b1574b0d61b.asciidoc deleted file mode 100644 index 46c992ea1..000000000 --- a/docs/examples/710c7871f20f176d51209b1574b0d61b.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// docs/get.asciidoc:335 - -[source, python] ----- -resp = client.get( - index="twitter", id="1", stored_fields=["tags", "counter"], -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/0bd3923424a20a4ba860b0774b9991b1.asciidoc b/docs/examples/711443504b69d0d296e717c716a223e2.asciidoc similarity index 96% rename from docs/examples/0bd3923424a20a4ba860b0774b9991b1.asciidoc rename to docs/examples/711443504b69d0d296e717c716a223e2.asciidoc index 67442da49..2293bf8fb 100644 --- a/docs/examples/0bd3923424a20a4ba860b0774b9991b1.asciidoc +++ b/docs/examples/711443504b69d0d296e717c716a223e2.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/nested-query.asciidoc:206 +// query-dsl/nested-query.asciidoc:212 [source, python] ---- diff --git a/docs/examples/71ba9033107882f61cdc3b32fc73568d.asciidoc b/docs/examples/71ba9033107882f61cdc3b32fc73568d.asciidoc deleted file mode 100644 index 2462f4616..000000000 --- a/docs/examples/71ba9033107882f61cdc3b32fc73568d.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// mapping.asciidoc:176 - -[source, python] ----- -resp = client.indices.put_mapping( - index="my-index", - body={ - "properties": {"employee-id": {"type": "keyword", "index": False}} - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/72beebe779a258c225dee7b023e60c52.asciidoc b/docs/examples/72beebe779a258c225dee7b023e60c52.asciidoc deleted file mode 100644 index 94e56e066..000000000 --- a/docs/examples/72beebe779a258c225dee7b023e60c52.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// search/request/scroll.asciidoc:148 - -[source, python] ----- -resp = client.nodes.stats(metric="indices", index_metric="search") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/73be1f93d789264e5b972ddb5991bc66.asciidoc b/docs/examples/73be1f93d789264e5b972ddb5991bc66.asciidoc new file mode 100644 index 000000000..d405994df --- /dev/null +++ b/docs/examples/73be1f93d789264e5b972ddb5991bc66.asciidoc @@ -0,0 +1,9 @@ +// setup/logging-config.asciidoc:156 + +[source, python] +---- +resp = client.cluster.put_settings( + body={"persistent": {"logger.org.elasticsearch.discovery": "DEBUG"}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/745f9b8cdb8e91073f6e520e1d9f8c05.asciidoc b/docs/examples/745f9b8cdb8e91073f6e520e1d9f8c05.asciidoc deleted file mode 100644 index 96fc5ae32..000000000 --- a/docs/examples/745f9b8cdb8e91073f6e520e1d9f8c05.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/get.asciidoc:73 - -[source, python] ----- -resp = client.get(index="twitter", id="0", _source=["*.id", "retweeted"]) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/746e0a1cb5984f2672963b363505c7b3.asciidoc b/docs/examples/746e0a1cb5984f2672963b363505c7b3.asciidoc new file mode 100644 index 000000000..16440a95b --- /dev/null +++ b/docs/examples/746e0a1cb5984f2672963b363505c7b3.asciidoc @@ -0,0 +1,33 @@ +// mapping/types/date.asciidoc:189 + +[source, python] +---- +resp = client.indices.create( + index="my-index-000001", + body={ + "mappings": { + "properties": { + "date": { + "type": "date", + "format": "strict_date_optional_time||epoch_second", + } + } + } + }, +) +print(resp) + +resp = client.index( + index="my-index-000001", + id="example", + refresh=True, + body={"date": 1618321898}, +) +print(resp) + +resp = client.search( + index="my-index-000001", + body={"fields": [{"field": "date"}], "_source": False}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/7477671958734843dd67cf0b8e6c7515.asciidoc b/docs/examples/7477671958734843dd67cf0b8e6c7515.asciidoc deleted file mode 100644 index 2c39ebb75..000000000 --- a/docs/examples/7477671958734843dd67cf0b8e6c7515.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// search/request/sort.asciidoc:192 - -[source, python] ----- -resp = client.indices.create( - index="index_long", - body={"mappings": {"properties": {"field": {"type": "date_nanos"}}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/74a80c28737a0648db0dfe7f049d12f2.asciidoc b/docs/examples/74a80c28737a0648db0dfe7f049d12f2.asciidoc new file mode 100644 index 000000000..32a60a025 --- /dev/null +++ b/docs/examples/74a80c28737a0648db0dfe7f049d12f2.asciidoc @@ -0,0 +1,10 @@ +// docs/get.asciidoc:272 + +[source, python] +---- +resp = client.exists( + index="my-index-000001", + id="0", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/764f9884b370cbdc82a1c5c42ed40ff3.asciidoc b/docs/examples/764f9884b370cbdc82a1c5c42ed40ff3.asciidoc deleted file mode 100644 index a103b1896..000000000 --- a/docs/examples/764f9884b370cbdc82a1c5c42ed40ff3.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// docs/reindex.asciidoc:605 - -[source, python] ----- -resp = client.reindex( - body={ - "source": { - "index": "twitter", - "query": {"term": {"user": "kimchy"}}, - }, - "dest": {"index": "new_twitter"}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/77113c65e1755313183a8969233a5a07.asciidoc b/docs/examples/77113c65e1755313183a8969233a5a07.asciidoc new file mode 100644 index 000000000..846821791 --- /dev/null +++ b/docs/examples/77113c65e1755313183a8969233a5a07.asciidoc @@ -0,0 +1,22 @@ +// mapping/types/keyword.asciidoc:249 + +[source, python] +---- +resp = client.indices.create( + index="idx", + body={ + "mappings": { + "_source": {"mode": "synthetic"}, + "properties": {"kwd": {"type": "keyword", "ignore_above": 3}}, + } + }, +) +print(resp) + +resp = client.index( + index="idx", + id="1", + body={"kwd": ["foo", "foo", "bang", "bar", "baz"]}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/77243bbf92f2a55e0fca6c2a349a1c15.asciidoc b/docs/examples/77243bbf92f2a55e0fca6c2a349a1c15.asciidoc deleted file mode 100644 index a7d9f79b4..000000000 --- a/docs/examples/77243bbf92f2a55e0fca6c2a349a1c15.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search/request/sort.asciidoc:539 - -[source, python] ----- -resp = client.search( - body={ - "sort": [ - { - "_geo_distance": { - "pin.location": [[-70, 40], [-71, 42]], - "order": "asc", - "unit": "km", - } - } - ], - "query": {"term": {"user": "kimchy"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/7841b65a3bb880ed66cec453925a50cf.asciidoc b/docs/examples/7841b65a3bb880ed66cec453925a50cf.asciidoc new file mode 100644 index 000000000..63a93884b --- /dev/null +++ b/docs/examples/7841b65a3bb880ed66cec453925a50cf.asciidoc @@ -0,0 +1,10 @@ +// docs/delete-by-query.asciidoc:380 + +[source, python] +---- +resp = client.delete_by_query( + index=["my-index-000001", "my-index-000002"], + body={"query": {"match_all": {}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/78c96113ae4ed0054e581b17542528a7.asciidoc b/docs/examples/78c96113ae4ed0054e581b17542528a7.asciidoc index 0abf26657..b43590212 100644 --- a/docs/examples/78c96113ae4ed0054e581b17542528a7.asciidoc +++ b/docs/examples/78c96113ae4ed0054e581b17542528a7.asciidoc @@ -1,4 +1,4 @@ -// docs/reindex.asciidoc:369 +// docs/reindex.asciidoc:403 [source, python] ---- diff --git a/docs/examples/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc b/docs/examples/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc new file mode 100644 index 000000000..56f2ae857 --- /dev/null +++ b/docs/examples/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc @@ -0,0 +1,10 @@ +// docs/update-by-query.asciidoc:12 + +[source, python] +---- +resp = client.update_by_query( + index="my-index-000001", + conflicts="proceed", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/7cac05cb589f1614fd5b8589153bef06.asciidoc b/docs/examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc similarity index 84% rename from docs/examples/7cac05cb589f1614fd5b8589153bef06.asciidoc rename to docs/examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc index 6e8678711..56f336f76 100644 --- a/docs/examples/7cac05cb589f1614fd5b8589153bef06.asciidoc +++ b/docs/examples/7b5c231526846f2f7b98d78f3656ae6a.asciidoc @@ -1,4 +1,4 @@ -// docs/update.asciidoc:325 +// docs/update.asciidoc:362 [source, python] ---- diff --git a/docs/examples/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc b/docs/examples/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc new file mode 100644 index 000000000..2a6990ca9 --- /dev/null +++ b/docs/examples/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc @@ -0,0 +1,15 @@ +// docs/delete-by-query.asciidoc:483 + +[source, python] +---- +resp = client.indices.refresh() +print(resp) + +resp = client.search( + index="my-index-000001", + size="0", + filter_path="hits.total", + body={"query": {"range": {"http.response.bytes": {"lt": 2000000}}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/7b908b1189f076942de8cd497ff1fa59.asciidoc b/docs/examples/7b908b1189f076942de8cd497ff1fa59.asciidoc index a404dd314..1c7070a6a 100644 --- a/docs/examples/7b908b1189f076942de8cd497ff1fa59.asciidoc +++ b/docs/examples/7b908b1189f076942de8cd497ff1fa59.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:212 +// query-dsl/multi-match-query.asciidoc:216 [source, python] ---- diff --git a/docs/examples/f085fb032dae56a3b104ab874eaea2ad.asciidoc b/docs/examples/7ca224d1a7de20a15c008e1b9dbda377.asciidoc similarity index 74% rename from docs/examples/f085fb032dae56a3b104ab874eaea2ad.asciidoc rename to docs/examples/7ca224d1a7de20a15c008e1b9dbda377.asciidoc index 079fe8fc5..2bdd311f7 100644 --- a/docs/examples/f085fb032dae56a3b104ab874eaea2ad.asciidoc +++ b/docs/examples/7ca224d1a7de20a15c008e1b9dbda377.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:748 +// aggregations/bucket/terms-aggregation.asciidoc:807 [source, python] ---- diff --git a/docs/examples/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc b/docs/examples/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc new file mode 100644 index 000000000..aa940631c --- /dev/null +++ b/docs/examples/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc @@ -0,0 +1,10 @@ +// indices/update-settings.asciidoc:81 + +[source, python] +---- +resp = client.indices.put_settings( + index="my-index-000001", + body={"index": {"refresh_interval": None}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/7cf71671859be7c1ecf673396db377cd.asciidoc b/docs/examples/7cf71671859be7c1ecf673396db377cd.asciidoc deleted file mode 100644 index 41de4a93a..000000000 --- a/docs/examples/7cf71671859be7c1ecf673396db377cd.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -// indices/aliases.asciidoc:314 - -[source, python] ----- -resp = client.indices.update_aliases( - body={ - "actions": [ - { - "add": { - "index": "test1", - "alias": "alias2", - "filter": {"term": {"user": "kimchy"}}, - } - } - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/7df191cc7f814e410a4ac7261065e6ef.asciidoc b/docs/examples/7df191cc7f814e410a4ac7261065e6ef.asciidoc index fe112d4c4..eceb43542 100644 --- a/docs/examples/7df191cc7f814e410a4ac7261065e6ef.asciidoc +++ b/docs/examples/7df191cc7f814e410a4ac7261065e6ef.asciidoc @@ -1,7 +1,10 @@ -// docs/update-by-query.asciidoc:413 +// docs/update-by-query.asciidoc:468 [source, python] ---- -resp = client.tasks.list(detailed="true", actions="*byquery") +resp = client.tasks.list( + detailed="true", + actions="*byquery", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc b/docs/examples/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc new file mode 100644 index 000000000..cbafc80b7 --- /dev/null +++ b/docs/examples/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc @@ -0,0 +1,12 @@ +// docs/reindex.asciidoc:25 + +[source, python] +---- +resp = client.reindex( + body={ + "source": {"index": "my-index-000001"}, + "dest": {"index": "my-new-index-000001"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/7e52bec09624cf6c0de5d13f2bfad5a5.asciidoc b/docs/examples/7e52bec09624cf6c0de5d13f2bfad5a5.asciidoc deleted file mode 100644 index 6b53bdcca..000000000 --- a/docs/examples/7e52bec09624cf6c0de5d13f2bfad5a5.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// search/request/scroll.asciidoc:45 - -[source, python] ----- -resp = client.search( - index="twitter", - scroll="1m", - body={"size": 100, "query": {"match": {"title": "elasticsearch"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/7f697eb436dfa3c30dfe610d8c32d132.asciidoc b/docs/examples/7f697eb436dfa3c30dfe610d8c32d132.asciidoc index 25833c0b6..90ea7deb6 100644 --- a/docs/examples/7f697eb436dfa3c30dfe610d8c32d132.asciidoc +++ b/docs/examples/7f697eb436dfa3c30dfe610d8c32d132.asciidoc @@ -1,4 +1,4 @@ -// docs/reindex.asciidoc:998 +// docs/reindex.asciidoc:1093 [source, python] ---- diff --git a/docs/examples/8baccd8688a6bad1749b8935f9601ea4.asciidoc b/docs/examples/7fef68840761c6982c14ad7af96caf37.asciidoc similarity index 90% rename from docs/examples/8baccd8688a6bad1749b8935f9601ea4.asciidoc rename to docs/examples/7fef68840761c6982c14ad7af96caf37.asciidoc index fbd92d2ec..d0ebccfa8 100644 --- a/docs/examples/8baccd8688a6bad1749b8935f9601ea4.asciidoc +++ b/docs/examples/7fef68840761c6982c14ad7af96caf37.asciidoc @@ -3,7 +3,7 @@ [source, python] ---- resp = client.index( - index="my_index", + index="my-index-000001", id="1", body={ "group": "fans", diff --git a/docs/examples/2a1de18774f9c68cafa169847832b2bc.asciidoc b/docs/examples/803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc similarity index 68% rename from docs/examples/2a1de18774f9c68cafa169847832b2bc.asciidoc rename to docs/examples/803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc index 697866db7..2a7dbc02e 100644 --- a/docs/examples/2a1de18774f9c68cafa169847832b2bc.asciidoc +++ b/docs/examples/803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc @@ -1,9 +1,9 @@ -// query-dsl/term-query.asciidoc:94 +// query-dsl/term-query.asciidoc:99 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={"mappings": {"properties": {"full_text": {"type": "text"}}}}, ) print(resp) diff --git a/docs/examples/e2a042c629429855c3bcaefffb26b7fa.asciidoc b/docs/examples/85479e02af00681210e17e3d0ff51e21.asciidoc similarity index 83% rename from docs/examples/e2a042c629429855c3bcaefffb26b7fa.asciidoc rename to docs/examples/85479e02af00681210e17e3d0ff51e21.asciidoc index b45860f8b..8e499f052 100644 --- a/docs/examples/e2a042c629429855c3bcaefffb26b7fa.asciidoc +++ b/docs/examples/85479e02af00681210e17e3d0ff51e21.asciidoc @@ -1,9 +1,9 @@ -// mapping/types/date.asciidoc:77 +// mapping/types/date.asciidoc:93 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={ "mappings": { "properties": { diff --git a/docs/examples/8653e76676de5d327201b77512afa3a0.asciidoc b/docs/examples/8653e76676de5d327201b77512afa3a0.asciidoc deleted file mode 100644 index 74d56c3ec..000000000 --- a/docs/examples/8653e76676de5d327201b77512afa3a0.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/update-settings.asciidoc:10 - -[source, python] ----- -resp = client.indices.put_settings( - index="twitter", body={"index": {"number_of_replicas": 2}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/873fbbc6ab81409058591385fd602736.asciidoc b/docs/examples/873fbbc6ab81409058591385fd602736.asciidoc index 58ee70893..e947a75d2 100644 --- a/docs/examples/873fbbc6ab81409058591385fd602736.asciidoc +++ b/docs/examples/873fbbc6ab81409058591385fd602736.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/nested-query.asciidoc:165 +// query-dsl/nested-query.asciidoc:171 [source, python] ---- diff --git a/docs/examples/87416e6a1ca2da324dbed6deb05303eb.asciidoc b/docs/examples/87416e6a1ca2da324dbed6deb05303eb.asciidoc new file mode 100644 index 000000000..e1ea15b94 --- /dev/null +++ b/docs/examples/87416e6a1ca2da324dbed6deb05303eb.asciidoc @@ -0,0 +1,24 @@ +// search/count.asciidoc:105 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + refresh=True, + body={"user.id": "kimchy"}, +) +print(resp) + +resp = client.count( + index="my-index-000001", + q="user:kimchy", +) +print(resp) + +resp = client.count( + index="my-index-000001", + body={"query": {"term": {"user.id": "kimchy"}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/899eef71a67a1b2aa11a2166ec7f48f1.asciidoc b/docs/examples/899eef71a67a1b2aa11a2166ec7f48f1.asciidoc deleted file mode 100644 index d33a83191..000000000 --- a/docs/examples/899eef71a67a1b2aa11a2166ec7f48f1.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// search/request/sort.asciidoc:369 - -[source, python] ----- -resp = client.search( - body={ - "sort": [{"price": {"unmapped_type": "long"}}], - "query": {"term": {"product": "chocolate"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/89a8ac1509936acc272fc2d72907bc45.asciidoc b/docs/examples/89a8ac1509936acc272fc2d72907bc45.asciidoc deleted file mode 100644 index 32d365a80..000000000 --- a/docs/examples/89a8ac1509936acc272fc2d72907bc45.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/get.asciidoc:269 - -[source, python] ----- -resp = client.get_source(index="twitter", id="1") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/ac544eb247a29ca42aab13826ca88561.asciidoc b/docs/examples/8a1f6cffa653800282c0ae160ee375bc.asciidoc similarity index 92% rename from docs/examples/ac544eb247a29ca42aab13826ca88561.asciidoc rename to docs/examples/8a1f6cffa653800282c0ae160ee375bc.asciidoc index abf9a53f2..a4406bdf8 100644 --- a/docs/examples/ac544eb247a29ca42aab13826ca88561.asciidoc +++ b/docs/examples/8a1f6cffa653800282c0ae160ee375bc.asciidoc @@ -1,4 +1,4 @@ -// docs/update.asciidoc:135 +// docs/update.asciidoc:155 [source, python] ---- diff --git a/docs/examples/8acc1d67b152e7027e0f0e1a8b4b2431.asciidoc b/docs/examples/8acc1d67b152e7027e0f0e1a8b4b2431.asciidoc deleted file mode 100644 index 5e5b37504..000000000 --- a/docs/examples/8acc1d67b152e7027e0f0e1a8b4b2431.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search.asciidoc:32 - -[source, python] ----- -resp = client.search( - index="twitter", - routing="kimchy", - body={ - "query": { - "bool": { - "must": { - "query_string": {"query": "some query string here"} - }, - "filter": {"term": {"user": "kimchy"}}, - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/8c5977410335d58217e0626618ce6641.asciidoc b/docs/examples/8c5977410335d58217e0626618ce6641.asciidoc deleted file mode 100644 index 3353f8345..000000000 --- a/docs/examples/8c5977410335d58217e0626618ce6641.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// query-dsl/terms-query.asciidoc:160 - -[source, python] ----- -resp = client.index(index="my_index", id="2", body={"color": "blue"}) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/8c8b5224befab7804461c7e7b6086d9a.asciidoc b/docs/examples/8c8b5224befab7804461c7e7b6086d9a.asciidoc new file mode 100644 index 000000000..4891e6542 --- /dev/null +++ b/docs/examples/8c8b5224befab7804461c7e7b6086d9a.asciidoc @@ -0,0 +1,25 @@ +// mapping/fields/id-field.asciidoc:14 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + body={"text": "Document with ID 1"}, +) +print(resp) + +resp = client.index( + index="my-index-000001", + id="2", + refresh="true", + body={"text": "Document with ID 2"}, +) +print(resp) + +resp = client.search( + index="my-index-000001", + body={"query": {"terms": {"_id": ["1", "2"]}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/8c9081dc738d1290fd76071b283fcaec.asciidoc b/docs/examples/8c9081dc738d1290fd76071b283fcaec.asciidoc new file mode 100644 index 000000000..e12f38b45 --- /dev/null +++ b/docs/examples/8c9081dc738d1290fd76071b283fcaec.asciidoc @@ -0,0 +1,11 @@ +// docs/get.asciidoc:92 + +[source, python] +---- +resp = client.get( + index="my-index-000001", + id="2", + routing="user1", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc b/docs/examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc index f69dee26e..a25227ab7 100644 --- a/docs/examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc +++ b/docs/examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc @@ -1,4 +1,4 @@ -// docs/bulk.asciidoc:533 +// docs/bulk.asciidoc:603 [source, python] ---- diff --git a/docs/examples/8d9a63d7c31f08bd27d92ece3de1649c.asciidoc b/docs/examples/8d9a63d7c31f08bd27d92ece3de1649c.asciidoc deleted file mode 100644 index 14e554ecf..000000000 --- a/docs/examples/8d9a63d7c31f08bd27d92ece3de1649c.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// mapping/fields/id-field.asciidoc:12 - -[source, python] ----- -resp = client.index( - index="my_index", id="1", body={"text": "Document with ID 1"}, -) -print(resp) - -resp = client.index( - index="my_index", - id="2", - refresh="true", - body={"text": "Document with ID 2"}, -) -print(resp) - -resp = client.search( - index="my_index", body={"query": {"terms": {"_id": ["1", "2"]}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/8e286a205a1f84f888a6d99f2620c80e.asciidoc b/docs/examples/8e286a205a1f84f888a6d99f2620c80e.asciidoc new file mode 100644 index 000000000..a3b8bd6e5 --- /dev/null +++ b/docs/examples/8e286a205a1f84f888a6d99f2620c80e.asciidoc @@ -0,0 +1,9 @@ +// setup/logging-config.asciidoc:233 + +[source, python] +---- +resp = client.cluster.put_settings( + body={"persistent": {"logger.org.elasticsearch.deprecation": "OFF"}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/8e6bfb4441ffa15c86d5dc20fa083571.asciidoc b/docs/examples/8e6bfb4441ffa15c86d5dc20fa083571.asciidoc deleted file mode 100644 index fe02688d3..000000000 --- a/docs/examples/8e6bfb4441ffa15c86d5dc20fa083571.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// setup/logging-config.asciidoc:155 - -[source, python] ----- -resp = client.cluster.put_settings( - body={"transient": {"logger.org.elasticsearch.transport": "trace"}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/71b5b2ba9557d0f296ff2de91727d2f6.asciidoc b/docs/examples/8eac28d2e9b6482b413d61817456a14f.asciidoc similarity index 88% rename from docs/examples/71b5b2ba9557d0f296ff2de91727d2f6.asciidoc rename to docs/examples/8eac28d2e9b6482b413d61817456a14f.asciidoc index 7f8c568e3..822855346 100644 --- a/docs/examples/71b5b2ba9557d0f296ff2de91727d2f6.asciidoc +++ b/docs/examples/8eac28d2e9b6482b413d61817456a14f.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:243 +// aggregations/bucket/terms-aggregation.asciidoc:272 [source, python] ---- diff --git a/docs/examples/a2a25aad1fea9a541b52ac613c78fb64.asciidoc b/docs/examples/8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc similarity index 86% rename from docs/examples/a2a25aad1fea9a541b52ac613c78fb64.asciidoc rename to docs/examples/8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc index 273f52b4e..0d47ed679 100644 --- a/docs/examples/a2a25aad1fea9a541b52ac613c78fb64.asciidoc +++ b/docs/examples/8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:297 +// query-dsl/query-string-query.asciidoc:299 [source, python] ---- diff --git a/docs/examples/9a8995fd31351045d99c78e40444c8ea.asciidoc b/docs/examples/8ee9521f57661a050efb614f02b4a090.asciidoc similarity index 70% rename from docs/examples/9a8995fd31351045d99c78e40444c8ea.asciidoc rename to docs/examples/8ee9521f57661a050efb614f02b4a090.asciidoc index 9eaf2fb9a..2b11968d7 100644 --- a/docs/examples/9a8995fd31351045d99c78e40444c8ea.asciidoc +++ b/docs/examples/8ee9521f57661a050efb614f02b4a090.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:57 +// aggregations/bucket/terms-aggregation.asciidoc:58 [source, python] ---- diff --git a/docs/examples/8f0511f8a5cb176ff2afdd4311799a33.asciidoc b/docs/examples/8f0511f8a5cb176ff2afdd4311799a33.asciidoc deleted file mode 100644 index 7856ce1b3..000000000 --- a/docs/examples/8f0511f8a5cb176ff2afdd4311799a33.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -// search/count.asciidoc:92 - -[source, python] ----- -resp = client.index( - index="twitter", id="1", refresh=True, body={"user": "kimchy"}, -) -print(resp) - -resp = client.count(index="twitter", q="user:kimchy") -print(resp) - -resp = client.count( - index="twitter", body={"query": {"term": {"user": "kimchy"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/774d715155cd13713e6e327adf6ce328.asciidoc b/docs/examples/8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc similarity index 77% rename from docs/examples/774d715155cd13713e6e327adf6ce328.asciidoc rename to docs/examples/8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc index c0c20c765..891db6f02 100644 --- a/docs/examples/774d715155cd13713e6e327adf6ce328.asciidoc +++ b/docs/examples/8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:723 +// aggregations/bucket/terms-aggregation.asciidoc:782 [source, python] ---- diff --git a/docs/examples/9166cf38427d5cde5d2ec12a2012b669.asciidoc b/docs/examples/9166cf38427d5cde5d2ec12a2012b669.asciidoc deleted file mode 100644 index 0afbb223e..000000000 --- a/docs/examples/9166cf38427d5cde5d2ec12a2012b669.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// indices/templates.asciidoc:231 - -[source, python] ----- -resp = client.indices.put_template( - name="template_1", - body={ - "index_patterns": ["*"], - "order": 0, - "settings": {"number_of_shards": 1}, - "version": 123, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/1577e6e806b3283c9e99f1596d310754.asciidoc b/docs/examples/926c0134aeaad53bd0f3bdad9c430217.asciidoc similarity index 70% rename from docs/examples/1577e6e806b3283c9e99f1596d310754.asciidoc rename to docs/examples/926c0134aeaad53bd0f3bdad9c430217.asciidoc index 0661a5625..6fefeb85d 100644 --- a/docs/examples/1577e6e806b3283c9e99f1596d310754.asciidoc +++ b/docs/examples/926c0134aeaad53bd0f3bdad9c430217.asciidoc @@ -1,9 +1,9 @@ -// docs/reindex.asciidoc:700 +// docs/reindex.asciidoc:763 [source, python] ---- resp = client.index( - index="test", + index="my-index-000001", id="1", refresh=True, body={"text": "words words", "flag": "foo"}, diff --git a/docs/examples/dfef545b1e2c247bafd1347e8e807ac1.asciidoc b/docs/examples/934aa38c3adcc4cf74ea40cd8736876c.asciidoc similarity index 85% rename from docs/examples/dfef545b1e2c247bafd1347e8e807ac1.asciidoc rename to docs/examples/934aa38c3adcc4cf74ea40cd8736876c.asciidoc index c44bb3ec6..708e31a96 100644 --- a/docs/examples/dfef545b1e2c247bafd1347e8e807ac1.asciidoc +++ b/docs/examples/934aa38c3adcc4cf74ea40cd8736876c.asciidoc @@ -1,4 +1,4 @@ -// indices/create-index.asciidoc:123 +// indices/create-index.asciidoc:172 [source, python] ---- diff --git a/docs/examples/0afaf1cad692e6201aa574c8feb6e622.asciidoc b/docs/examples/9403764e6eccad7b321b65e9a10c5727.asciidoc similarity index 85% rename from docs/examples/0afaf1cad692e6201aa574c8feb6e622.asciidoc rename to docs/examples/9403764e6eccad7b321b65e9a10c5727.asciidoc index 348c9d9f5..eb8b302b3 100644 --- a/docs/examples/0afaf1cad692e6201aa574c8feb6e622.asciidoc +++ b/docs/examples/9403764e6eccad7b321b65e9a10c5727.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:492 +// aggregations/bucket/terms-aggregation.asciidoc:543 [source, python] ---- diff --git a/docs/examples/946522c26d02bebf5c527ba28e55c724.asciidoc b/docs/examples/946522c26d02bebf5c527ba28e55c724.asciidoc new file mode 100644 index 000000000..173ce7164 --- /dev/null +++ b/docs/examples/946522c26d02bebf5c527ba28e55c724.asciidoc @@ -0,0 +1,10 @@ +// docs/update-by-query.asciidoc:352 + +[source, python] +---- +resp = client.update_by_query( + index="my-index-000001", + routing="1", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/83f95657beca9bf5d8264c80c7fb463f.asciidoc b/docs/examples/9467e52087a13b63b02d78c35ff6f798.asciidoc similarity index 100% rename from docs/examples/83f95657beca9bf5d8264c80c7fb463f.asciidoc rename to docs/examples/9467e52087a13b63b02d78c35ff6f798.asciidoc diff --git a/docs/examples/f2d68493abd3ca430bd03a7f7f8d18f9.asciidoc b/docs/examples/957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc similarity index 84% rename from docs/examples/f2d68493abd3ca430bd03a7f7f8d18f9.asciidoc rename to docs/examples/957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc index 2e54acf56..14527760a 100644 --- a/docs/examples/f2d68493abd3ca430bd03a7f7f8d18f9.asciidoc +++ b/docs/examples/957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:265 +// query-dsl/query-string-query.asciidoc:267 [source, python] ---- diff --git a/docs/examples/95b3f53f2065737bbeba6199e8a12df3.asciidoc b/docs/examples/95b3f53f2065737bbeba6199e8a12df3.asciidoc new file mode 100644 index 000000000..ae6c833a4 --- /dev/null +++ b/docs/examples/95b3f53f2065737bbeba6199e8a12df3.asciidoc @@ -0,0 +1,11 @@ +// query-dsl/terms-query.asciidoc:152 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + body={"color": ["blue", "green"]}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc b/docs/examples/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc index 2b0f355fe..2031deff1 100644 --- a/docs/examples/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc +++ b/docs/examples/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc @@ -1,4 +1,4 @@ -// docs/reindex.asciidoc:780 +// docs/reindex.asciidoc:843 [source, python] ---- diff --git a/docs/examples/978088f989d45dd09339582e9cbc60e0.asciidoc b/docs/examples/978088f989d45dd09339582e9cbc60e0.asciidoc deleted file mode 100644 index 5e6bd3806..000000000 --- a/docs/examples/978088f989d45dd09339582e9cbc60e0.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// api-conventions.asciidoc:79 - -[source, python] ----- -resp = client.search( - index="%3Clogstash-%7Bnow%2Fd%7D%3E", - body={"query": {"match": {"test": "data"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/979d25dff2d8987119410291ad47b0d1.asciidoc b/docs/examples/979d25dff2d8987119410291ad47b0d1.asciidoc deleted file mode 100644 index ca41f7843..000000000 --- a/docs/examples/979d25dff2d8987119410291ad47b0d1.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search/request/sort.asciidoc:444 - -[source, python] ----- -resp = client.search( - body={ - "sort": [ - { - "_geo_distance": { - "pin.location": {"lat": 40, "lon": -70}, - "order": "asc", - "unit": "km", - } - } - ], - "query": {"term": {"user": "kimchy"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/97babc8d19ef0866774576716eb6d19e.asciidoc b/docs/examples/97babc8d19ef0866774576716eb6d19e.asciidoc index eec3f36f3..835116fdd 100644 --- a/docs/examples/97babc8d19ef0866774576716eb6d19e.asciidoc +++ b/docs/examples/97babc8d19ef0866774576716eb6d19e.asciidoc @@ -1,9 +1,11 @@ -// docs/update-by-query.asciidoc:720 +// docs/update-by-query.asciidoc:775 [source, python] ---- resp = client.update_by_query( - index="test", refresh=True, conflicts="proceed", + index="test", + refresh=True, + conflicts="proceed", ) print(resp) diff --git a/docs/examples/98234499cfec70487cec5d013e976a84.asciidoc b/docs/examples/98234499cfec70487cec5d013e976a84.asciidoc deleted file mode 100644 index 3ff9dc712..000000000 --- a/docs/examples/98234499cfec70487cec5d013e976a84.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/get.asciidoc:253 - -[source, python] ----- -resp = client.exists(index="twitter", id="0") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b68c85fe1b0d2f264dc0d1cbf530f319.asciidoc b/docs/examples/996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc similarity index 95% rename from docs/examples/b68c85fe1b0d2f264dc0d1cbf530f319.asciidoc rename to docs/examples/996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc index 5305f9c29..5673e5a70 100644 --- a/docs/examples/b68c85fe1b0d2f264dc0d1cbf530f319.asciidoc +++ b/docs/examples/996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc @@ -10,7 +10,7 @@ resp = client.search( "script_score": { "script": { "params": {"a": 5, "b": 1.2}, - "source": "params.a / Math.pow(params.b, doc['likes'].value)", + "source": "params.a / Math.pow(params.b, doc['my-int'].value)", } }, } diff --git a/docs/examples/99a52be903945b17e734a1d02a57e958.asciidoc b/docs/examples/99a52be903945b17e734a1d02a57e958.asciidoc deleted file mode 100644 index 62f75a00b..000000000 --- a/docs/examples/99a52be903945b17e734a1d02a57e958.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// mapping.asciidoc:260 - -[source, python] ----- -resp = client.indices.get_field_mapping( - index="my-index", fields="employee-id", -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/70f0aa5853697e265ef3b1df72940951.asciidoc b/docs/examples/9a02bd47c000a3d9a8911233c37c890f.asciidoc similarity index 77% rename from docs/examples/70f0aa5853697e265ef3b1df72940951.asciidoc rename to docs/examples/9a02bd47c000a3d9a8911233c37c890f.asciidoc index 4c740df0a..fd12e4bd9 100644 --- a/docs/examples/70f0aa5853697e265ef3b1df72940951.asciidoc +++ b/docs/examples/9a02bd47c000a3d9a8911233c37c890f.asciidoc @@ -1,9 +1,9 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:380 +// aggregations/bucket/datehistogram-aggregation.asciidoc:366 [source, python] ---- resp = client.index( - index="my_index", + index="my-index-000001", id="1", refresh=True, body={"date": "2015-10-01T00:30:00Z"}, @@ -11,7 +11,7 @@ resp = client.index( print(resp) resp = client.index( - index="my_index", + index="my-index-000001", id="2", refresh=True, body={"date": "2015-10-01T01:30:00Z"}, @@ -19,7 +19,7 @@ resp = client.index( print(resp) resp = client.search( - index="my_index", + index="my-index-000001", size="0", body={ "aggs": { diff --git a/docs/examples/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc b/docs/examples/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc index 9bb54c6c9..5dcf1808f 100644 --- a/docs/examples/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc +++ b/docs/examples/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc @@ -1,4 +1,4 @@ -// docs/reindex.asciidoc:764 +// docs/reindex.asciidoc:827 [source, python] ---- diff --git a/docs/examples/58df61acbfb15b8ef0aaa18b81ae98a6.asciidoc b/docs/examples/9bae72e974bdeb56007d9104e73eff92.asciidoc similarity index 84% rename from docs/examples/58df61acbfb15b8ef0aaa18b81ae98a6.asciidoc rename to docs/examples/9bae72e974bdeb56007d9104e73eff92.asciidoc index 3945211e4..242c988d5 100644 --- a/docs/examples/58df61acbfb15b8ef0aaa18b81ae98a6.asciidoc +++ b/docs/examples/9bae72e974bdeb56007d9104e73eff92.asciidoc @@ -1,4 +1,4 @@ -// docs/update.asciidoc:164 +// docs/update.asciidoc:182 [source, python] ---- diff --git a/docs/examples/8a355eb25d2a01ba62dc1a22dd46f46f.asciidoc b/docs/examples/9bfdda207b701028a3439e495e800c02.asciidoc similarity index 85% rename from docs/examples/8a355eb25d2a01ba62dc1a22dd46f46f.asciidoc rename to docs/examples/9bfdda207b701028a3439e495e800c02.asciidoc index a72df5980..7364449e5 100644 --- a/docs/examples/8a355eb25d2a01ba62dc1a22dd46f46f.asciidoc +++ b/docs/examples/9bfdda207b701028a3439e495e800c02.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:303 +// aggregations/bucket/datehistogram-aggregation.asciidoc:288 [source, python] ---- diff --git a/docs/examples/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc b/docs/examples/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc new file mode 100644 index 000000000..901989488 --- /dev/null +++ b/docs/examples/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc @@ -0,0 +1,12 @@ +// docs/delete-by-query.asciidoc:521 + +[source, python] +---- +resp = client.delete_by_query( + index="my-index-000001", + refresh=True, + slices="5", + body={"query": {"range": {"http.response.bytes": {"lt": 2000000}}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/46c4b0dfb674825f9579203d41e7f404.asciidoc b/docs/examples/9f04cc1a0c6cdb3ed2247f1399713767.asciidoc similarity index 68% rename from docs/examples/46c4b0dfb674825f9579203d41e7f404.asciidoc rename to docs/examples/9f04cc1a0c6cdb3ed2247f1399713767.asciidoc index 73ca5169a..4104eefb1 100644 --- a/docs/examples/46c4b0dfb674825f9579203d41e7f404.asciidoc +++ b/docs/examples/9f04cc1a0c6cdb3ed2247f1399713767.asciidoc @@ -1,9 +1,9 @@ -// mapping/types/keyword.asciidoc:20 +// mapping/types/keyword.asciidoc:31 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={"mappings": {"properties": {"tags": {"type": "keyword"}}}}, ) print(resp) diff --git a/docs/examples/e21e1c26dc8687e7bf7bd2bf019a6698.asciidoc b/docs/examples/a0c868282c0514a342ad04998cdc2175.asciidoc similarity index 67% rename from docs/examples/e21e1c26dc8687e7bf7bd2bf019a6698.asciidoc rename to docs/examples/a0c868282c0514a342ad04998cdc2175.asciidoc index 45990817e..381085e99 100644 --- a/docs/examples/e21e1c26dc8687e7bf7bd2bf019a6698.asciidoc +++ b/docs/examples/a0c868282c0514a342ad04998cdc2175.asciidoc @@ -1,9 +1,9 @@ -// docs/delete-by-query.asciidoc:349 +// docs/delete-by-query.asciidoc:367 [source, python] ---- resp = client.delete_by_query( - index="twitter", + index="my-index-000001", conflicts="proceed", body={"query": {"match_all": {}}}, ) diff --git a/docs/examples/a0f4e902d18460337684d74ea932fbe9.asciidoc b/docs/examples/a0f4e902d18460337684d74ea932fbe9.asciidoc new file mode 100644 index 000000000..e9aad3ad4 --- /dev/null +++ b/docs/examples/a0f4e902d18460337684d74ea932fbe9.asciidoc @@ -0,0 +1,11 @@ +// docs/update.asciidoc:257 + +[source, python] +---- +resp = client.update( + index="test", + id="1", + body={"doc": {"name": "new_name"}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/a1db5c822745fe167e9ef854dca3d129.asciidoc b/docs/examples/a1db5c822745fe167e9ef854dca3d129.asciidoc deleted file mode 100644 index 885da2f06..000000000 --- a/docs/examples/a1db5c822745fe167e9ef854dca3d129.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search/request/sort.asciidoc:491 - -[source, python] ----- -resp = client.search( - body={ - "sort": [ - { - "_geo_distance": { - "pin.location": "drm3btev3e86", - "order": "asc", - "unit": "km", - } - } - ], - "query": {"term": {"user": "kimchy"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/a2b2ce031120dac49b5120b26eea8758.asciidoc b/docs/examples/a2b2ce031120dac49b5120b26eea8758.asciidoc new file mode 100644 index 000000000..23ad3259a --- /dev/null +++ b/docs/examples/a2b2ce031120dac49b5120b26eea8758.asciidoc @@ -0,0 +1,11 @@ +// cat/indices.asciidoc:109 + +[source, python] +---- +resp = client.cat.indices( + index="my-index-*", + v="true", + s="index", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/a34d70d7022eb4ba48909d440c80390f.asciidoc b/docs/examples/a34d70d7022eb4ba48909d440c80390f.asciidoc index fb8e03c0a..1fad28d92 100644 --- a/docs/examples/a34d70d7022eb4ba48909d440c80390f.asciidoc +++ b/docs/examples/a34d70d7022eb4ba48909d440c80390f.asciidoc @@ -1,9 +1,13 @@ -// api-conventions.asciidoc:133 +// api-conventions.asciidoc:164 [source, python] ---- resp = client.search( - index="%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogstash-%7Bnow%2Fd%7D%3E", + index=[ + "", + "", + "", + ], body={"query": {"match": {"test": "data"}}}, ) print(resp) diff --git a/docs/examples/a3e79d6c626a490341c5b731acbb4a5d.asciidoc b/docs/examples/a3e79d6c626a490341c5b731acbb4a5d.asciidoc new file mode 100644 index 000000000..cd3470669 --- /dev/null +++ b/docs/examples/a3e79d6c626a490341c5b731acbb4a5d.asciidoc @@ -0,0 +1,10 @@ +// docs/get.asciidoc:307 + +[source, python] +---- +resp = client.exists_source( + index="my-index-000001", + id="1", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/a49169b4622918992411fab4ec48191b.asciidoc b/docs/examples/a49169b4622918992411fab4ec48191b.asciidoc deleted file mode 100644 index 2d6384331..000000000 --- a/docs/examples/a49169b4622918992411fab4ec48191b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -// aggregations/bucket/terms-aggregation.asciidoc:466 - -[source, python] ----- -resp = client.search( - body={ - "aggs": { - "genres": { - "terms": { - "field": "genre", - "script": { - "source": "'Genre: ' +_value", - "lang": "painless", - }, - } - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/a4a396cd07657b3977713fb3a742c41b.asciidoc b/docs/examples/a4a396cd07657b3977713fb3a742c41b.asciidoc deleted file mode 100644 index 7472b8876..000000000 --- a/docs/examples/a4a396cd07657b3977713fb3a742c41b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/update-by-query.asciidoc:12 - -[source, python] ----- -resp = client.update_by_query(index="twitter", conflicts="proceed") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/a5a7050fb9dcb9574e081957ade28617.asciidoc b/docs/examples/a5a7050fb9dcb9574e081957ade28617.asciidoc deleted file mode 100644 index 9286722b0..000000000 --- a/docs/examples/a5a7050fb9dcb9574e081957ade28617.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// docs/delete-by-query.asciidoc:487 - -[source, python] ----- -resp = client.delete_by_query( - index="twitter", - refresh=True, - slices="5", - body={"query": {"range": {"likes": {"lt": 10}}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/c849c6c8f8659dbb93e1c14356f74e37.asciidoc b/docs/examples/a5f9eb40087921e67d820775acf71522.asciidoc similarity index 67% rename from docs/examples/c849c6c8f8659dbb93e1c14356f74e37.asciidoc rename to docs/examples/a5f9eb40087921e67d820775acf71522.asciidoc index 1cded841a..5d1605a99 100644 --- a/docs/examples/c849c6c8f8659dbb93e1c14356f74e37.asciidoc +++ b/docs/examples/a5f9eb40087921e67d820775acf71522.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:234 +// indices/put-mapping.asciidoc:212 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={"mappings": {"properties": {"city": {"type": "text"}}}}, ) print(resp) diff --git a/docs/examples/d9474f66970c6955e24b17c7447e7b5f.asciidoc b/docs/examples/a692b4c0ca7825c467880b346841f5a5.asciidoc similarity index 78% rename from docs/examples/d9474f66970c6955e24b17c7447e7b5f.asciidoc rename to docs/examples/a692b4c0ca7825c467880b346841f5a5.asciidoc index 23ae8f1f8..c1e195991 100644 --- a/docs/examples/d9474f66970c6955e24b17c7447e7b5f.asciidoc +++ b/docs/examples/a692b4c0ca7825c467880b346841f5a5.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:144 +// indices/put-mapping.asciidoc:156 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={ "mappings": { "properties": { diff --git a/docs/examples/a6bb306ca250cf651f19cae808b97012.asciidoc b/docs/examples/a6bb306ca250cf651f19cae808b97012.asciidoc new file mode 100644 index 000000000..fe3111219 --- /dev/null +++ b/docs/examples/a6bb306ca250cf651f19cae808b97012.asciidoc @@ -0,0 +1,9 @@ +// indices/get-index.asciidoc:11 + +[source, python] +---- +resp = client.indices.get( + index="my-index-000001", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/a6f8636b03cc5f677b7d89e750328612.asciidoc b/docs/examples/a6f8636b03cc5f677b7d89e750328612.asciidoc deleted file mode 100644 index 33ea233f2..000000000 --- a/docs/examples/a6f8636b03cc5f677b7d89e750328612.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// api-conventions.asciidoc:571 - -[source, python] ----- -resp = client.search(index="twitter", size="surprise_me") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/a6fdd0100cd362df54af6c95d1055c96.asciidoc b/docs/examples/a6fdd0100cd362df54af6c95d1055c96.asciidoc new file mode 100644 index 000000000..b98b8b0ea --- /dev/null +++ b/docs/examples/a6fdd0100cd362df54af6c95d1055c96.asciidoc @@ -0,0 +1,9 @@ +// indices/get-mapping.asciidoc:11 + +[source, python] +---- +resp = client.indices.get_mapping( + index="my-index-000001", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/afc29b61c532cf683f749baf013e7bfe.asciidoc b/docs/examples/a72613de3774571ba24def4b495161b5.asciidoc similarity index 75% rename from docs/examples/afc29b61c532cf683f749baf013e7bfe.asciidoc rename to docs/examples/a72613de3774571ba24def4b495161b5.asciidoc index ee39f50f9..6a0dcf792 100644 --- a/docs/examples/afc29b61c532cf683f749baf013e7bfe.asciidoc +++ b/docs/examples/a72613de3774571ba24def4b495161b5.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:536 +// indices/put-mapping.asciidoc:422 [source, python] ---- resp = client.indices.put_mapping( - index="my_index", + index="my-index-000001", body={ "properties": { "user_id": {"type": "alias", "path": "user_identifier"} diff --git a/docs/examples/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc b/docs/examples/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc new file mode 100644 index 000000000..5ff354df4 --- /dev/null +++ b/docs/examples/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc @@ -0,0 +1,11 @@ +// docs/update.asciidoc:205 + +[source, python] +---- +resp = client.update( + index="test", + id="1", + body={"script": "ctx._source['my-object'].remove('my-subfield')"}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/a7c15fe6b5779c84ce9a34bf4b2a7ab7.asciidoc b/docs/examples/a7c15fe6b5779c84ce9a34bf4b2a7ab7.asciidoc deleted file mode 100644 index eab85f624..000000000 --- a/docs/examples/a7c15fe6b5779c84ce9a34bf4b2a7ab7.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// mapping/params/fielddata.asciidoc:84 - -[source, python] ----- -resp = client.indices.put_mapping( - index="my_index", - body={"properties": {"my_field": {"type": "text", "fielddata": True}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/a84ffbaa4ffa68b22f6fe42d3b4f8dd5.asciidoc b/docs/examples/a84ffbaa4ffa68b22f6fe42d3b4f8dd5.asciidoc new file mode 100644 index 000000000..2bcfac3ae --- /dev/null +++ b/docs/examples/a84ffbaa4ffa68b22f6fe42d3b4f8dd5.asciidoc @@ -0,0 +1,6 @@ +// aggregations/bucket/datehistogram-aggregation.asciidoc:588 + +[source, python] +---- + +---- \ No newline at end of file diff --git a/docs/examples/a8fba09a46b2c3524428aa3259b7124f.asciidoc b/docs/examples/a8fba09a46b2c3524428aa3259b7124f.asciidoc deleted file mode 100644 index 0140644be..000000000 --- a/docs/examples/a8fba09a46b2c3524428aa3259b7124f.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// indices/get-mapping.asciidoc:10 - -[source, python] ----- -resp = client.indices.get_mapping(index="twitter") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b9c5d7ca6ca9c6f747201f45337a4abf.asciidoc b/docs/examples/a9fe70387d9c96a07830e1859c57efbb.asciidoc similarity index 68% rename from docs/examples/b9c5d7ca6ca9c6f747201f45337a4abf.asciidoc rename to docs/examples/a9fe70387d9c96a07830e1859c57efbb.asciidoc index e275ed104..5362700b8 100644 --- a/docs/examples/b9c5d7ca6ca9c6f747201f45337a4abf.asciidoc +++ b/docs/examples/a9fe70387d9c96a07830e1859c57efbb.asciidoc @@ -1,9 +1,9 @@ -// indices/create-index.asciidoc:99 +// indices/create-index.asciidoc:148 [source, python] ---- resp = client.indices.create( - index="twitter", + index="my-index-000001", body={"settings": {"number_of_shards": 3, "number_of_replicas": 2}}, ) print(resp) diff --git a/docs/examples/aaa7a61b07861235fb6e489b946c705c.asciidoc b/docs/examples/aaa7a61b07861235fb6e489b946c705c.asciidoc new file mode 100644 index 000000000..c33358bff --- /dev/null +++ b/docs/examples/aaa7a61b07861235fb6e489b946c705c.asciidoc @@ -0,0 +1,13 @@ +// docs/index_.asciidoc:487 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + version="2", + version_type="external", + body={"user": {"id": "elkbee"}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/ab8b4537fad80107bc88f633d4039a52.asciidoc b/docs/examples/ab8b4537fad80107bc88f633d4039a52.asciidoc new file mode 100644 index 000000000..75e0dac4f --- /dev/null +++ b/docs/examples/ab8b4537fad80107bc88f633d4039a52.asciidoc @@ -0,0 +1,10 @@ +// indices/create-index.asciidoc:210 + +[source, python] +---- +resp = client.indices.create( + index="logs", + body={"aliases": {"": {}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc b/docs/examples/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc index 9e32fbdf7..31b497283 100644 --- a/docs/examples/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc +++ b/docs/examples/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc @@ -1,4 +1,4 @@ -// docs/update-by-query.asciidoc:693 +// docs/update-by-query.asciidoc:748 [source, python] ---- diff --git a/docs/examples/abf329ebefaf58acd4ee30e685731499.asciidoc b/docs/examples/abf329ebefaf58acd4ee30e685731499.asciidoc deleted file mode 100644 index a308becdd..000000000 --- a/docs/examples/abf329ebefaf58acd4ee30e685731499.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// search/request/sort.asciidoc:122 - -[source, python] ----- -resp = client.indices.create( - index="index_double", - body={"mappings": {"properties": {"field": {"type": "double"}}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/fa2fe60f570bd930d2891778c6efbfe6.asciidoc b/docs/examples/ac497917ef707538198a8458ae3d5c6b.asciidoc similarity index 100% rename from docs/examples/fa2fe60f570bd930d2891778c6efbfe6.asciidoc rename to docs/examples/ac497917ef707538198a8458ae3d5c6b.asciidoc diff --git a/docs/examples/ebb6b59fbc9325c17e45f524602d6be2.asciidoc b/docs/examples/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc similarity index 56% rename from docs/examples/ebb6b59fbc9325c17e45f524602d6be2.asciidoc rename to docs/examples/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc index 2c75f8546..e5b810213 100644 --- a/docs/examples/ebb6b59fbc9325c17e45f524602d6be2.asciidoc +++ b/docs/examples/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc @@ -3,8 +3,8 @@ [source, python] ---- resp = client.delete_by_query( - index="twitter", - body={"query": {"match": {"message": "some message"}}}, + index="my-index-000001", + body={"query": {"match": {"user.id": "elkbee"}}}, ) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/db6cba451ba562abe953d09ad80cc15c.asciidoc b/docs/examples/acc6cd860032167e34fa5e0c043ab3b0.asciidoc similarity index 80% rename from docs/examples/db6cba451ba562abe953d09ad80cc15c.asciidoc rename to docs/examples/acc6cd860032167e34fa5e0c043ab3b0.asciidoc index d6e5d456c..dbda1fe25 100644 --- a/docs/examples/db6cba451ba562abe953d09ad80cc15c.asciidoc +++ b/docs/examples/acc6cd860032167e34fa5e0c043ab3b0.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:333 +// query-dsl/query-string-query.asciidoc:335 [source, python] ---- diff --git a/docs/examples/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc b/docs/examples/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc index 7b2d814e1..594a94f88 100644 --- a/docs/examples/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc +++ b/docs/examples/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:400 +// query-dsl/multi-match-query.asciidoc:410 [source, python] ---- diff --git a/docs/examples/fdd38f0d248385a444c777e7acd97846.asciidoc b/docs/examples/ad2416ca0581316cee6c63129685bca5.asciidoc similarity index 86% rename from docs/examples/fdd38f0d248385a444c777e7acd97846.asciidoc rename to docs/examples/ad2416ca0581316cee6c63129685bca5.asciidoc index 302243456..bd0a07dc8 100644 --- a/docs/examples/fdd38f0d248385a444c777e7acd97846.asciidoc +++ b/docs/examples/ad2416ca0581316cee6c63129685bca5.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:496 +// query-dsl/query-string-query.asciidoc:498 [source, python] ---- diff --git a/docs/examples/ad3b159657d4bcb373623fdc61acc3bf.asciidoc b/docs/examples/ad3b159657d4bcb373623fdc61acc3bf.asciidoc new file mode 100644 index 000000000..c176fcb92 --- /dev/null +++ b/docs/examples/ad3b159657d4bcb373623fdc61acc3bf.asciidoc @@ -0,0 +1,10 @@ +// search/count.asciidoc:10 + +[source, python] +---- +resp = client.count( + index="my-index-000001", + q="user:kimchy", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/ad79228630684d950fe9792a768d24c5.asciidoc b/docs/examples/ad79228630684d950fe9792a768d24c5.asciidoc deleted file mode 100644 index 2abcf856b..000000000 --- a/docs/examples/ad79228630684d950fe9792a768d24c5.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// indices/aliases.asciidoc:456 - -[source, python] ----- -resp = client.indices.update_aliases( - body={ - "actions": [ - { - "add": { - "index": "test", - "alias": "alias1", - "is_write_index": False, - } - }, - { - "add": { - "index": "test2", - "alias": "alias1", - "is_write_index": True, - } - }, - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/ae9b5fbd42af2386ffbf56ad4a697e51.asciidoc b/docs/examples/ae9b5fbd42af2386ffbf56ad4a697e51.asciidoc deleted file mode 100644 index 000039ec9..000000000 --- a/docs/examples/ae9b5fbd42af2386ffbf56ad4a697e51.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -// search/request/sort.asciidoc:30 - -[source, python] ----- -resp = client.search( - index="my_index", - body={ - "sort": [ - {"post_date": {"order": "asc"}}, - "user", - {"name": "desc"}, - {"age": "desc"}, - "_score", - ], - "query": {"term": {"user": "kimchy"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc b/docs/examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc index 45dc5b6c3..91ff65d0b 100644 --- a/docs/examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc +++ b/docs/examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc @@ -1,4 +1,4 @@ -// docs/bulk.asciidoc:422 +// docs/bulk.asciidoc:492 [source, python] ---- diff --git a/docs/examples/af3fb9fa5691a7b37a6dc2a69ff66e64.asciidoc b/docs/examples/af3fb9fa5691a7b37a6dc2a69ff66e64.asciidoc deleted file mode 100644 index 6b9d9169c..000000000 --- a/docs/examples/af3fb9fa5691a7b37a6dc2a69ff66e64.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// indices/aliases.asciidoc:200 - -[source, python] ----- -resp = client.indices.update_aliases( - body={ - "actions": [ - {"remove": {"index": "test1", "alias": "alias1"}}, - {"add": {"index": "test1", "alias": "alias2"}}, - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b789292f9cf63ce912e058c46d90ce20.asciidoc b/docs/examples/af44cc7fb0c435d4497c77baf904bf5e.asciidoc similarity index 84% rename from docs/examples/b789292f9cf63ce912e058c46d90ce20.asciidoc rename to docs/examples/af44cc7fb0c435d4497c77baf904bf5e.asciidoc index 7b1621286..8ad9787f2 100644 --- a/docs/examples/b789292f9cf63ce912e058c46d90ce20.asciidoc +++ b/docs/examples/af44cc7fb0c435d4497c77baf904bf5e.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:119 +// aggregations/bucket/datehistogram-aggregation.asciidoc:103 [source, python] ---- diff --git a/docs/examples/b02e4907c9936c1adc16ccce9d49900d.asciidoc b/docs/examples/b02e4907c9936c1adc16ccce9d49900d.asciidoc index cace8ed0c..aa0948b1a 100644 --- a/docs/examples/b02e4907c9936c1adc16ccce9d49900d.asciidoc +++ b/docs/examples/b02e4907c9936c1adc16ccce9d49900d.asciidoc @@ -1,4 +1,4 @@ -// cluster/health.asciidoc:143 +// cluster/health.asciidoc:156 [source, python] ---- diff --git a/docs/examples/b0d64d0a554549e5b2808002a0725493.asciidoc b/docs/examples/b0d64d0a554549e5b2808002a0725493.asciidoc deleted file mode 100644 index c7d3da501..000000000 --- a/docs/examples/b0d64d0a554549e5b2808002a0725493.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// search/request/scroll.asciidoc:161 - -[source, python] ----- -resp = client.clear_scroll( - body={ - "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==" - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc b/docs/examples/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc index ac0cedbc9..dee1322a6 100644 --- a/docs/examples/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc +++ b/docs/examples/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:130 +// query-dsl/multi-match-query.asciidoc:131 [source, python] ---- diff --git a/docs/examples/b0ec418bf416c62bed602b0a32a6d5f5.asciidoc b/docs/examples/b0ec418bf416c62bed602b0a32a6d5f5.asciidoc deleted file mode 100644 index ea9519b62..000000000 --- a/docs/examples/b0ec418bf416c62bed602b0a32a6d5f5.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// indices/aliases.asciidoc:435 - -[source, python] ----- -resp = client.index(index="alias1", id="1", body={"foo": "bar"}) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc b/docs/examples/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc new file mode 100644 index 000000000..3be35619d --- /dev/null +++ b/docs/examples/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc @@ -0,0 +1,11 @@ +// docs/update.asciidoc:105 + +[source, python] +---- +resp = client.index( + index="test", + id="1", + body={"counter": 1, "tags": ["red"]}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/d31062ff8c015387889fed4ad86fd914.asciidoc b/docs/examples/b10668cc742e666fe0eb6a53fd38a93e.asciidoc similarity index 91% rename from docs/examples/d31062ff8c015387889fed4ad86fd914.asciidoc rename to docs/examples/b10668cc742e666fe0eb6a53fd38a93e.asciidoc index 726459839..0aceec9b7 100644 --- a/docs/examples/d31062ff8c015387889fed4ad86fd914.asciidoc +++ b/docs/examples/b10668cc742e666fe0eb6a53fd38a93e.asciidoc @@ -6,7 +6,7 @@ resp = client.search( body={ "query": { "wildcard": { - "user": { + "user.id": { "value": "ki*y", "boost": 1, "rewrite": "constant_score", diff --git a/docs/examples/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc b/docs/examples/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc index 2d048e9b3..1f2c69e22 100644 --- a/docs/examples/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc +++ b/docs/examples/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc @@ -1,4 +1,4 @@ -// docs/reindex.asciidoc:413 +// docs/reindex.asciidoc:450 [source, python] ---- diff --git a/docs/examples/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc b/docs/examples/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc new file mode 100644 index 000000000..6b64ae725 --- /dev/null +++ b/docs/examples/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc @@ -0,0 +1,14 @@ +// docs/index_.asciidoc:277 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + body={ + "@timestamp": "2099-11-15T13:12:00", + "message": "GET /search HTTP/1.1 200 1070000", + "user": {"id": "kimchy"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/96de5703ba0bd43fd4ac239ec5408542.asciidoc b/docs/examples/b3a711c3deddcdb8a3f6623184a8b794.asciidoc similarity index 90% rename from docs/examples/96de5703ba0bd43fd4ac239ec5408542.asciidoc rename to docs/examples/b3a711c3deddcdb8a3f6623184a8b794.asciidoc index cd3f50f4f..dda6087ad 100644 --- a/docs/examples/96de5703ba0bd43fd4ac239ec5408542.asciidoc +++ b/docs/examples/b3a711c3deddcdb8a3f6623184a8b794.asciidoc @@ -1,4 +1,4 @@ -// docs/update.asciidoc:96 +// docs/update.asciidoc:118 [source, python] ---- diff --git a/docs/examples/b41dce56b0e640d32b1cf452f87cec17.asciidoc b/docs/examples/b41dce56b0e640d32b1cf452f87cec17.asciidoc deleted file mode 100644 index 15a6e5080..000000000 --- a/docs/examples/b41dce56b0e640d32b1cf452f87cec17.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// search/request/scroll.asciidoc:63 - -[source, python] ----- -resp = client.scroll( - body={ - "scroll": "1m", - "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b4392116f2cc57ce8064ccbad30318d5.asciidoc b/docs/examples/b4392116f2cc57ce8064ccbad30318d5.asciidoc deleted file mode 100644 index d9db250b7..000000000 --- a/docs/examples/b4392116f2cc57ce8064ccbad30318d5.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/aliases.asciidoc:166 - -[source, python] ----- -resp = client.indices.update_aliases( - body={"actions": [{"add": {"index": "test1", "alias": "alias1"}}]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b515427f8685ca7d79176def672d19fa.asciidoc b/docs/examples/b515427f8685ca7d79176def672d19fa.asciidoc new file mode 100644 index 000000000..1c2ba8431 --- /dev/null +++ b/docs/examples/b515427f8685ca7d79176def672d19fa.asciidoc @@ -0,0 +1,15 @@ +// docs/update-by-query.asciidoc:612 + +[source, python] +---- +resp = client.indices.refresh() +print(resp) + +resp = client.search( + index="my-index-000001", + size="0", + q="extra:test", + filter_path="hits.total", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/b58b17975bbce307b2ccce5051a449e8.asciidoc b/docs/examples/b58b17975bbce307b2ccce5051a449e8.asciidoc new file mode 100644 index 000000000..698a8e83e --- /dev/null +++ b/docs/examples/b58b17975bbce307b2ccce5051a449e8.asciidoc @@ -0,0 +1,12 @@ +// docs/delete-by-query.asciidoc:538 + +[source, python] +---- +resp = client.search( + index="my-index-000001", + size="0", + filter_path="hits.total", + body={"query": {"range": {"http.response.bytes": {"lt": 2000000}}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/b5f95bc097a201b29c7200fc8d3d31c1.asciidoc b/docs/examples/b5f95bc097a201b29c7200fc8d3d31c1.asciidoc deleted file mode 100644 index 471f589e3..000000000 --- a/docs/examples/b5f95bc097a201b29c7200fc8d3d31c1.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -// indices/templates.asciidoc:180 - -[source, python] ----- -resp = client.indices.put_template( - name="template_1", - body={ - "index_patterns": ["*"], - "order": 0, - "settings": {"number_of_shards": 1}, - "mappings": {"_source": {"enabled": False}}, - }, -) -print(resp) - -resp = client.indices.put_template( - name="template_2", - body={ - "index_patterns": ["te*"], - "order": 1, - "settings": {"number_of_shards": 1}, - "mappings": {"_source": {"enabled": True}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/527324766814561b75aaee853ede49a7.asciidoc b/docs/examples/b6c872d04eabb39d1947cde6b29d4ae1.asciidoc similarity index 74% rename from docs/examples/527324766814561b75aaee853ede49a7.asciidoc rename to docs/examples/b6c872d04eabb39d1947cde6b29d4ae1.asciidoc index 5f10f129a..4c493746b 100644 --- a/docs/examples/527324766814561b75aaee853ede49a7.asciidoc +++ b/docs/examples/b6c872d04eabb39d1947cde6b29d4ae1.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:369 +// aggregations/bucket/terms-aggregation.asciidoc:419 [source, python] ---- diff --git a/docs/examples/b7a9f60b3646efe3834ca8381f8aa560.asciidoc b/docs/examples/b7a9f60b3646efe3834ca8381f8aa560.asciidoc new file mode 100644 index 000000000..ca29f3a8f --- /dev/null +++ b/docs/examples/b7a9f60b3646efe3834ca8381f8aa560.asciidoc @@ -0,0 +1,9 @@ +// setup/logging-config.asciidoc:169 + +[source, python] +---- +resp = client.cluster.put_settings( + body={"persistent": {"logger.org.elasticsearch.discovery": None}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/b918d6b798da673a33e49b94f61dcdc0.asciidoc b/docs/examples/b918d6b798da673a33e49b94f61dcdc0.asciidoc deleted file mode 100644 index 14bc94d1b..000000000 --- a/docs/examples/b918d6b798da673a33e49b94f61dcdc0.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -// docs/index_.asciidoc:367 - -[source, python] ----- -resp = client.index( - index="twitter", - id="1", - timeout="5m", - body={ - "user": "kimchy", - "post_date": "2009-11-15T14:12:12", - "message": "trying out Elasticsearch", - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/28aad2c5942bfb221c2bf1bbdc01658e.asciidoc b/docs/examples/b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc similarity index 84% rename from docs/examples/28aad2c5942bfb221c2bf1bbdc01658e.asciidoc rename to docs/examples/b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc index a0e93f124..7f6770d7d 100644 --- a/docs/examples/28aad2c5942bfb221c2bf1bbdc01658e.asciidoc +++ b/docs/examples/b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:316 +// query-dsl/query-string-query.asciidoc:318 [source, python] ---- diff --git a/docs/examples/b94cee0f74f57742b3948f9b784dfdd4.asciidoc b/docs/examples/b94cee0f74f57742b3948f9b784dfdd4.asciidoc deleted file mode 100644 index 36eedee65..000000000 --- a/docs/examples/b94cee0f74f57742b3948f9b784dfdd4.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// search/request/scroll.asciidoc:194 - -[source, python] ----- -resp = client.clear_scroll( - scroll_id=[ - "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==", - "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB", - ], -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b997885974522ef439d5e345924cc5ba.asciidoc b/docs/examples/b997885974522ef439d5e345924cc5ba.asciidoc deleted file mode 100644 index f083af297..000000000 --- a/docs/examples/b997885974522ef439d5e345924cc5ba.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search/request/sort.asciidoc:94 - -[source, python] ----- -resp = client.index( - index="my_index", - id="1", - refresh=True, - body={"product": "chocolate", "price": [20, 4]}, -) -print(resp) - -resp = client.search( - body={ - "query": {"term": {"product": "chocolate"}}, - "sort": [{"price": {"order": "asc", "mode": "avg"}}], - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b9a153725b28fdd0a5aabd7f17a8c2d7.asciidoc b/docs/examples/b9a153725b28fdd0a5aabd7f17a8c2d7.asciidoc deleted file mode 100644 index dab5d5a46..000000000 --- a/docs/examples/b9a153725b28fdd0a5aabd7f17a8c2d7.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// api-conventions.asciidoc:377 - -[source, python] ----- -resp = client.indices.get_settings(index="twitter", flat_settings="true") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/ba59a3b9a0a2694704b2bf9c6ad4a8cf.asciidoc b/docs/examples/ba59a3b9a0a2694704b2bf9c6ad4a8cf.asciidoc new file mode 100644 index 000000000..77b897af5 --- /dev/null +++ b/docs/examples/ba59a3b9a0a2694704b2bf9c6ad4a8cf.asciidoc @@ -0,0 +1,6 @@ +// aggregations/bucket/datehistogram-aggregation.asciidoc:610 + +[source, python] +---- + +---- \ No newline at end of file diff --git a/docs/examples/bb143628fd04070683eeeadc9406d9cc.asciidoc b/docs/examples/bb143628fd04070683eeeadc9406d9cc.asciidoc deleted file mode 100644 index 29b614e7e..000000000 --- a/docs/examples/bb143628fd04070683eeeadc9406d9cc.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// docs/index_.asciidoc:454 - -[source, python] ----- -resp = client.index( - index="twitter", - id="1", - body={ - "user": "kimchy", - "post_date": "2009-11-15T14:12:12", - "message": "trying out Elasticsearch", - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/bc1ad5cc6d3eab98e3ce01f209ba7094.asciidoc b/docs/examples/bc1ad5cc6d3eab98e3ce01f209ba7094.asciidoc deleted file mode 100644 index 905643de2..000000000 --- a/docs/examples/bc1ad5cc6d3eab98e3ce01f209ba7094.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// indices/aliases.asciidoc:342 - -[source, python] ----- -resp = client.indices.update_aliases( - body={ - "actions": [ - {"add": {"index": "test", "alias": "alias1", "routing": "1"}} - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc b/docs/examples/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc new file mode 100644 index 000000000..7dce5caac --- /dev/null +++ b/docs/examples/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc @@ -0,0 +1,10 @@ +// docs/update-by-query.asciidoc:361 + +[source, python] +---- +resp = client.update_by_query( + index="my-index-000001", + scroll_size="100", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc b/docs/examples/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc index 9117c2ac5..e72fb1ecc 100644 --- a/docs/examples/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc +++ b/docs/examples/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc @@ -1,9 +1,10 @@ -// docs/update-by-query.asciidoc:510 +// docs/update-by-query.asciidoc:565 [source, python] ---- resp = client.update_by_query_rethrottle( - task_id="r1A2WoRbTwKZ516z6NEs5A:36619", requests_per_second="-1", + task_id="r1A2WoRbTwKZ516z6NEs5A:36619", + requests_per_second="-1", ) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/be3a6431d01846950dc1a39a7a6a1faa.asciidoc b/docs/examples/be3a6431d01846950dc1a39a7a6a1faa.asciidoc index 3fd29800b..a1b8c7c87 100644 --- a/docs/examples/be3a6431d01846950dc1a39a7a6a1faa.asciidoc +++ b/docs/examples/be3a6431d01846950dc1a39a7a6a1faa.asciidoc @@ -1,7 +1,9 @@ -// docs/update-by-query.asciidoc:471 +// docs/update-by-query.asciidoc:526 [source, python] ---- -resp = client.tasks.get(task_id="r1A2WoRbTwKZ516z6NEs5A:36619") +resp = client.tasks.get( + task_id="r1A2WoRbTwKZ516z6NEs5A:36619", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/ea02de2dbe05091fcb0dac72c8ba5f83.asciidoc b/docs/examples/be5b415d7f33d6f0397ac2f8b5c10521.asciidoc similarity index 72% rename from docs/examples/ea02de2dbe05091fcb0dac72c8ba5f83.asciidoc rename to docs/examples/be5b415d7f33d6f0397ac2f8b5c10521.asciidoc index f4873249b..42b7b6fac 100644 --- a/docs/examples/ea02de2dbe05091fcb0dac72c8ba5f83.asciidoc +++ b/docs/examples/be5b415d7f33d6f0397ac2f8b5c10521.asciidoc @@ -1,9 +1,9 @@ -// docs/update-by-query.asciidoc:586 +// docs/update-by-query.asciidoc:641 [source, python] ---- resp = client.update_by_query( - index="twitter", + index="my-index-000001", refresh=True, slices="5", body={"script": {"source": "ctx._source['extra'] = 'test'"}}, diff --git a/docs/examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc b/docs/examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc new file mode 100644 index 000000000..199992402 --- /dev/null +++ b/docs/examples/be5fef0640c3a650ee96f84e3376a1be.asciidoc @@ -0,0 +1,18 @@ +// docs/update.asciidoc:333 + +[source, python] +---- +resp = client.update( + index="test", + id="1", + body={ + "scripted_upsert": True, + "script": { + "source": "\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n ", + "params": {"count": 4}, + }, + "upsert": {}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/be8f28f31207b173de61be032fcf239c.asciidoc b/docs/examples/be8f28f31207b173de61be032fcf239c.asciidoc deleted file mode 100644 index ee2054774..000000000 --- a/docs/examples/be8f28f31207b173de61be032fcf239c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// indices/get-index.asciidoc:10 - -[source, python] ----- -resp = client.indices.get(index="twitter") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/6bf63f2ec6ba55fcaf1092f48212bf25.asciidoc b/docs/examples/beb0b9ff4f68672273fcff1b7bae706b.asciidoc similarity index 74% rename from docs/examples/6bf63f2ec6ba55fcaf1092f48212bf25.asciidoc rename to docs/examples/beb0b9ff4f68672273fcff1b7bae706b.asciidoc index 6c6b35fc6..82530fb39 100644 --- a/docs/examples/6bf63f2ec6ba55fcaf1092f48212bf25.asciidoc +++ b/docs/examples/beb0b9ff4f68672273fcff1b7bae706b.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:519 +// indices/put-mapping.asciidoc:405 [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={ "mappings": { "properties": {"user_identifier": {"type": "keyword"}} diff --git a/docs/examples/bfcd65ab85d684d36a8550080032958d.asciidoc b/docs/examples/bfcd65ab85d684d36a8550080032958d.asciidoc deleted file mode 100644 index 6f3588664..000000000 --- a/docs/examples/bfcd65ab85d684d36a8550080032958d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// search/request-body.asciidoc:65 - -[source, python] ----- -resp = client.search(q="message:number", size="0", terminate_after="1") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc b/docs/examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc index baea987e7..66a3c18f9 100644 --- a/docs/examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc +++ b/docs/examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc @@ -1,4 +1,4 @@ -// docs/bulk.asciidoc:634 +// docs/bulk.asciidoc:704 [source, python] ---- diff --git a/docs/examples/c06b96352e15f0161705fee0b5925776.asciidoc b/docs/examples/c06b96352e15f0161705fee0b5925776.asciidoc new file mode 100644 index 000000000..9e45248fd --- /dev/null +++ b/docs/examples/c06b96352e15f0161705fee0b5925776.asciidoc @@ -0,0 +1,6 @@ +// query-dsl/nested-query.asciidoc:442 + +[source, python] +---- + +---- \ No newline at end of file diff --git a/docs/examples/d0a8a938a2fa913b6fdbc871079a59dd.asciidoc b/docs/examples/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc similarity index 56% rename from docs/examples/d0a8a938a2fa913b6fdbc871079a59dd.asciidoc rename to docs/examples/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc index d8520c96c..bf68f4e31 100644 --- a/docs/examples/d0a8a938a2fa913b6fdbc871079a59dd.asciidoc +++ b/docs/examples/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc @@ -3,7 +3,7 @@ [source, python] ---- resp = client.search( - body={"query": {"term": {"user": {"value": "Kimchy", "boost": 1}}}}, + body={"query": {"term": {"user.id": {"value": "kimchy", "boost": 1}}}}, ) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/ba0b4081c98f3387f76b77847c52ee9a.asciidoc b/docs/examples/c0ebaa33e750b87555dc352073f692e8.asciidoc similarity index 58% rename from docs/examples/ba0b4081c98f3387f76b77847c52ee9a.asciidoc rename to docs/examples/c0ebaa33e750b87555dc352073f692e8.asciidoc index e934bf08d..0f12819c7 100644 --- a/docs/examples/ba0b4081c98f3387f76b77847c52ee9a.asciidoc +++ b/docs/examples/c0ebaa33e750b87555dc352073f692e8.asciidoc @@ -1,12 +1,14 @@ -// indices/update-settings.asciidoc:145 +// indices/update-settings.asciidoc:171 [source, python] ---- -resp = client.indices.close(index="twitter") +resp = client.indices.close( + index="my-index-000001", +) print(resp) resp = client.indices.put_settings( - index="twitter", + index="my-index-000001", body={ "analysis": { "analyzer": { @@ -17,6 +19,8 @@ resp = client.indices.put_settings( ) print(resp) -resp = client.indices.open(index="twitter") +resp = client.indices.open( + index="my-index-000001", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/d222c6a6ec7a3beca6c97011b0874512.asciidoc b/docs/examples/c0ff8b3db994c4736f7579dde18097d2.asciidoc similarity index 72% rename from docs/examples/d222c6a6ec7a3beca6c97011b0874512.asciidoc rename to docs/examples/c0ff8b3db994c4736f7579dde18097d2.asciidoc index fe2b41807..a49449e16 100644 --- a/docs/examples/d222c6a6ec7a3beca6c97011b0874512.asciidoc +++ b/docs/examples/c0ff8b3db994c4736f7579dde18097d2.asciidoc @@ -1,9 +1,9 @@ -// docs/get.asciidoc:278 +// docs/get.asciidoc:297 [source, python] ---- resp = client.get_source( - index="twitter", + index="my-index-000001", id="1", _source_includes="*.id", _source_excludes="entities", diff --git a/docs/examples/cdedd5f33f7e5f7acde561e97bff61de.asciidoc b/docs/examples/c1a895497066a3dac674d4b1a119048d.asciidoc similarity index 69% rename from docs/examples/cdedd5f33f7e5f7acde561e97bff61de.asciidoc rename to docs/examples/c1a895497066a3dac674d4b1a119048d.asciidoc index 7a994b7b7..8c1ea284f 100644 --- a/docs/examples/cdedd5f33f7e5f7acde561e97bff61de.asciidoc +++ b/docs/examples/c1a895497066a3dac674d4b1a119048d.asciidoc @@ -1,9 +1,9 @@ -// query-dsl/term-query.asciidoc:132 +// query-dsl/term-query.asciidoc:137 [source, python] ---- resp = client.search( - index="my_index", + index="my-index-000001", pretty=True, body={"query": {"term": {"full_text": "Quick Brown Foxes!"}}}, ) diff --git a/docs/examples/c22b72c4a52ee098331b3f252c22860d.asciidoc b/docs/examples/c22b72c4a52ee098331b3f252c22860d.asciidoc deleted file mode 100644 index b7bda1471..000000000 --- a/docs/examples/c22b72c4a52ee098331b3f252c22860d.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// docs/delete-by-query.asciidoc:362 - -[source, python] ----- -resp = client.delete_by_query( - index=["twitter", "blog"], body={"query": {"match_all": {}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/c2c21e2824fbf6b7198ede30419da82b.asciidoc b/docs/examples/c2c21e2824fbf6b7198ede30419da82b.asciidoc deleted file mode 100644 index db7d560f9..000000000 --- a/docs/examples/c2c21e2824fbf6b7198ede30419da82b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// search/request/scroll.asciidoc:186 - -[source, python] ----- -resp = client.clear_scroll(scroll_id="_all") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/c48264ec5d9b9679fddd72e5c44425b9.asciidoc b/docs/examples/c48264ec5d9b9679fddd72e5c44425b9.asciidoc deleted file mode 100644 index eeaeea7bb..000000000 --- a/docs/examples/c48264ec5d9b9679fddd72e5c44425b9.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// cluster/health.asciidoc:179 - -[source, python] ----- -resp = client.cluster.health(index="twitter", level="shards") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/c526fca1609b4c3c1d12dfd218d69a50.asciidoc b/docs/examples/c526fca1609b4c3c1d12dfd218d69a50.asciidoc new file mode 100644 index 000000000..bcfd83dcf --- /dev/null +++ b/docs/examples/c526fca1609b4c3c1d12dfd218d69a50.asciidoc @@ -0,0 +1,12 @@ +// indices/put-mapping.asciidoc:377 + +[source, python] +---- +resp = client.reindex( + body={ + "source": {"index": "my-index-000001"}, + "dest": {"index": "my-new-index-000001"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/6a4679531e64c492fce16dc12de6dcb0.asciidoc b/docs/examples/c5802e9f3f4068fcecb6937b867b270d.asciidoc similarity index 80% rename from docs/examples/6a4679531e64c492fce16dc12de6dcb0.asciidoc rename to docs/examples/c5802e9f3f4068fcecb6937b867b270d.asciidoc index 1e4e7faa4..c9ece83fd 100644 --- a/docs/examples/6a4679531e64c492fce16dc12de6dcb0.asciidoc +++ b/docs/examples/c5802e9f3f4068fcecb6937b867b270d.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:207 +// aggregations/bucket/terms-aggregation.asciidoc:400 [source, python] ---- diff --git a/docs/examples/c5e5873783246c7b1c01d8464fed72c4.asciidoc b/docs/examples/c5e5873783246c7b1c01d8464fed72c4.asciidoc deleted file mode 100644 index c0fbe4b61..000000000 --- a/docs/examples/c5e5873783246c7b1c01d8464fed72c4.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/delete.asciidoc:168 - -[source, python] ----- -resp = client.delete(index="twitter", id="1") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/2533e4b36ae837eaecda08407ecb6383.asciidoc b/docs/examples/c64b61bedb21b9def8fce5092e677af9.asciidoc similarity index 61% rename from docs/examples/2533e4b36ae837eaecda08407ecb6383.asciidoc rename to docs/examples/c64b61bedb21b9def8fce5092e677af9.asciidoc index bb157915c..30c0c079b 100644 --- a/docs/examples/2533e4b36ae837eaecda08407ecb6383.asciidoc +++ b/docs/examples/c64b61bedb21b9def8fce5092e677af9.asciidoc @@ -1,4 +1,4 @@ -// search/suggesters.asciidoc:51 +// search/suggesters.asciidoc:46 [source, python] ---- @@ -9,7 +9,10 @@ resp = client.search( "text": "tring out Elasticsearch", "term": {"field": "message"}, }, - "my-suggest-2": {"text": "kmichy", "term": {"field": "user"}}, + "my-suggest-2": { + "text": "kmichy", + "term": {"field": "user.id"}, + }, } }, ) diff --git a/docs/examples/626f8c4b3e2cd3d9beaa63a7f5799d7a.asciidoc b/docs/examples/c67b0f00c2e690303c0e5af2f51e0fea.asciidoc similarity index 84% rename from docs/examples/626f8c4b3e2cd3d9beaa63a7f5799d7a.asciidoc rename to docs/examples/c67b0f00c2e690303c0e5af2f51e0fea.asciidoc index c8ffa4728..ba43f19d4 100644 --- a/docs/examples/626f8c4b3e2cd3d9beaa63a7f5799d7a.asciidoc +++ b/docs/examples/c67b0f00c2e690303c0e5af2f51e0fea.asciidoc @@ -1,9 +1,9 @@ -// search/suggesters.asciidoc:8 +// search/suggesters.asciidoc:7 [source, python] ---- resp = client.search( - index="twitter", + index="my-index-000001", body={ "query": {"match": {"message": "tring out Elasticsearch"}}, "suggest": { diff --git a/docs/examples/bd5918ab903c0889bb1f09c8c2466e43.asciidoc b/docs/examples/c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc similarity index 68% rename from docs/examples/bd5918ab903c0889bb1f09c8c2466e43.asciidoc rename to docs/examples/c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc index 388b9e647..e265ac1fd 100644 --- a/docs/examples/bd5918ab903c0889bb1f09c8c2466e43.asciidoc +++ b/docs/examples/c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:409 +// indices/put-mapping.asciidoc:321 [source, python] ---- resp = client.indices.create( - index="users", + index="my-index-000001", body={"mappings": {"properties": {"user_id": {"type": "long"}}}}, ) print(resp) diff --git a/docs/examples/c87038b96ab06d9a741a130f94de4f02.asciidoc b/docs/examples/c87038b96ab06d9a741a130f94de4f02.asciidoc new file mode 100644 index 000000000..e0fd70333 --- /dev/null +++ b/docs/examples/c87038b96ab06d9a741a130f94de4f02.asciidoc @@ -0,0 +1,11 @@ +// docs/delete.asciidoc:138 + +[source, python] +---- +resp = client.delete( + index="my-index-000001", + id="1", + timeout="5m", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc b/docs/examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc new file mode 100644 index 000000000..eb95f1e64 --- /dev/null +++ b/docs/examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc @@ -0,0 +1,42 @@ +// docs/bulk.asciidoc:757 + +[source, python] +---- +resp = client.indices.create( + index="my-index", + body={ + "mappings": { + "dynamic_templates": [ + {"geo_point": {"mapping": {"type": "geo_point"}}} + ] + } + }, +) +print(resp) + +resp = client.bulk( + body=[ + { + "index": { + "_index": "my_index", + "_id": "1", + "dynamic_templates": {"work_location": "geo_point"}, + } + }, + { + "field": "value1", + "work_location": "41.12,-71.34", + "raw_location": "41.12,-71.34", + }, + { + "create": { + "_index": "my_index", + "_id": "2", + "dynamic_templates": {"home_location": "geo_point"}, + } + }, + {"field": "value2", "home_location": "41.12,-71.34"}, + ], +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/98aeb275f829b5f7b8eb2147701565ff.asciidoc b/docs/examples/c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc similarity index 77% rename from docs/examples/98aeb275f829b5f7b8eb2147701565ff.asciidoc rename to docs/examples/c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc index 350e349c0..c2ef22100 100644 --- a/docs/examples/98aeb275f829b5f7b8eb2147701565ff.asciidoc +++ b/docs/examples/c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc @@ -1,4 +1,4 @@ -// docs/update.asciidoc:177 +// docs/update.asciidoc:218 [source, python] ---- @@ -7,7 +7,7 @@ resp = client.update( id="1", body={ "script": { - "source": "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'none' }", + "source": "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }", "lang": "painless", "params": {"tag": "green"}, } diff --git a/docs/examples/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc b/docs/examples/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc new file mode 100644 index 000000000..97b1c40a4 --- /dev/null +++ b/docs/examples/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc @@ -0,0 +1,11 @@ +// query-dsl/terms-query.asciidoc:21 + +[source, python] +---- +resp = client.search( + body={ + "query": {"terms": {"user.id": ["kimchy", "elkbee"], "boost": 1}} + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/98f14fddddea54a7d6149ab7b92e099d.asciidoc b/docs/examples/caab99520d3fe41f6154d74a7f696057.asciidoc similarity index 55% rename from docs/examples/98f14fddddea54a7d6149ab7b92e099d.asciidoc rename to docs/examples/caab99520d3fe41f6154d74a7f696057.asciidoc index 410a15f15..a790b85fd 100644 --- a/docs/examples/98f14fddddea54a7d6149ab7b92e099d.asciidoc +++ b/docs/examples/caab99520d3fe41f6154d74a7f696057.asciidoc @@ -2,6 +2,8 @@ [source, python] ---- -resp = client.indices.delete(index="twitter") +resp = client.indices.delete( + index="my-index-000001", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/cb01106bf524df5e0501d4c655c1aa7b.asciidoc b/docs/examples/cb01106bf524df5e0501d4c655c1aa7b.asciidoc deleted file mode 100644 index 39648c09f..000000000 --- a/docs/examples/cb01106bf524df5e0501d4c655c1aa7b.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// docs/reindex.asciidoc:260 - -[source, python] ----- -resp = client.reindex( - slices="5", - refresh=True, - body={ - "source": {"index": "twitter"}, - "dest": {"index": "new_twitter"}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/cb0c3223fd45148497df73adfba2e9ce.asciidoc b/docs/examples/cb0c3223fd45148497df73adfba2e9ce.asciidoc new file mode 100644 index 000000000..07509c129 --- /dev/null +++ b/docs/examples/cb0c3223fd45148497df73adfba2e9ce.asciidoc @@ -0,0 +1,15 @@ +// docs/reindex.asciidoc:668 + +[source, python] +---- +resp = client.reindex( + body={ + "source": { + "index": "my-index-000001", + "query": {"term": {"user.id": "kimchy"}}, + }, + "dest": {"index": "my-new-index-000001"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/cd247f267968aa0927bfdad56852f8f5.asciidoc b/docs/examples/cd247f267968aa0927bfdad56852f8f5.asciidoc deleted file mode 100644 index cd75a6611..000000000 --- a/docs/examples/cd247f267968aa0927bfdad56852f8f5.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// getting-started.asciidoc:482 - -[source, python] ----- -resp = client.search( - index="bank", body={"query": {"match": {"address": "mill lane"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/a80f5db4357bb25b8704d374c18318ed.asciidoc b/docs/examples/cda045dfd79acd160ed8668f2ee17ea7.asciidoc similarity index 69% rename from docs/examples/a80f5db4357bb25b8704d374c18318ed.asciidoc rename to docs/examples/cda045dfd79acd160ed8668f2ee17ea7.asciidoc index 1e516fc34..2a043cc81 100644 --- a/docs/examples/a80f5db4357bb25b8704d374c18318ed.asciidoc +++ b/docs/examples/cda045dfd79acd160ed8668f2ee17ea7.asciidoc @@ -1,9 +1,9 @@ -// query-dsl/term-query.asciidoc:165 +// query-dsl/term-query.asciidoc:170 [source, python] ---- resp = client.search( - index="my_index", + index="my-index-000001", pretty=True, body={"query": {"match": {"full_text": "Quick Brown Foxes!"}}}, ) diff --git a/docs/examples/734c2e2a1e45b84f1e4e65b51356fcd7.asciidoc b/docs/examples/cdb68b3f565df7c85e52a55864b37d40.asciidoc similarity index 67% rename from docs/examples/734c2e2a1e45b84f1e4e65b51356fcd7.asciidoc rename to docs/examples/cdb68b3f565df7c85e52a55864b37d40.asciidoc index 901ac940a..b811f6e7b 100644 --- a/docs/examples/734c2e2a1e45b84f1e4e65b51356fcd7.asciidoc +++ b/docs/examples/cdb68b3f565df7c85e52a55864b37d40.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:446 +// indices/put-mapping.asciidoc:358 [source, python] ---- resp = client.indices.create( - index="new_users", + index="my-new-index-000001", body={"mappings": {"properties": {"user_id": {"type": "keyword"}}}}, ) print(resp) diff --git a/docs/examples/cdd7127681254f4d614cc075f9e6fbcf.asciidoc b/docs/examples/cdd7127681254f4d614cc075f9e6fbcf.asciidoc new file mode 100644 index 000000000..94d17542f --- /dev/null +++ b/docs/examples/cdd7127681254f4d614cc075f9e6fbcf.asciidoc @@ -0,0 +1,10 @@ +// docs/delete-by-query.asciidoc:427 + +[source, python] +---- +resp = client.delete_by_query( + index="my-index-000001", + body={"query": {"term": {"user.id": "kimchy"}}, "max_docs": 1}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/cde4dddae5c06e7f1d38c9d933dbc7ac.asciidoc b/docs/examples/cde4dddae5c06e7f1d38c9d933dbc7ac.asciidoc deleted file mode 100644 index 6a69a3e95..000000000 --- a/docs/examples/cde4dddae5c06e7f1d38c9d933dbc7ac.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/update-by-query.asciidoc:319 - -[source, python] ----- -resp = client.update_by_query(index=["twitter", "blog"]) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/4cd246e5c4c035a2cd4081ae9a3d54e5.asciidoc b/docs/examples/cdf400299acd1c7b1b7bb42e284e3d08.asciidoc similarity index 90% rename from docs/examples/4cd246e5c4c035a2cd4081ae9a3d54e5.asciidoc rename to docs/examples/cdf400299acd1c7b1b7bb42e284e3d08.asciidoc index d3f129f84..6d3e7c961 100644 --- a/docs/examples/4cd246e5c4c035a2cd4081ae9a3d54e5.asciidoc +++ b/docs/examples/cdf400299acd1c7b1b7bb42e284e3d08.asciidoc @@ -1,4 +1,4 @@ -// docs/update.asciidoc:114 +// docs/update.asciidoc:135 [source, python] ---- diff --git a/docs/examples/cf02e3d8b371bd59f0224967c36330da.asciidoc b/docs/examples/cf02e3d8b371bd59f0224967c36330da.asciidoc deleted file mode 100644 index a55f5e5ef..000000000 --- a/docs/examples/cf02e3d8b371bd59f0224967c36330da.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// indices/get-mapping.asciidoc:60 - -[source, python] ----- -resp = client.indices.get_mapping(index=["twitter", "kimchy"]) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/cfbaea6f0df045c5d940bbb6a9c69cd8.asciidoc b/docs/examples/cfbaea6f0df045c5d940bbb6a9c69cd8.asciidoc deleted file mode 100644 index ac3d7f80a..000000000 --- a/docs/examples/cfbaea6f0df045c5d940bbb6a9c69cd8.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// getting-started.asciidoc:665 - -[source, python] ----- -resp = client.search( - index="bank", - body={ - "size": 0, - "aggs": { - "group_by_state": { - "terms": {"field": "state.keyword"}, - "aggs": {"average_balance": {"avg": {"field": "balance"}}}, - } - }, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/cfc37446bd892d1ac42a3c8e8b204e6c.asciidoc b/docs/examples/cfc37446bd892d1ac42a3c8e8b204e6c.asciidoc deleted file mode 100644 index 93934ad58..000000000 --- a/docs/examples/cfc37446bd892d1ac42a3c8e8b204e6c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/reindex.asciidoc:731 - -[source, python] ----- -resp = client.get(index="test2", id="1") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/d17269bb80fb63ec0bf37d219e003dcb.asciidoc b/docs/examples/d17269bb80fb63ec0bf37d219e003dcb.asciidoc deleted file mode 100644 index 79410d284..000000000 --- a/docs/examples/d17269bb80fb63ec0bf37d219e003dcb.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// search/request/sort.asciidoc:391 - -[source, python] ----- -resp = client.search( - body={ - "sort": [ - { - "_geo_distance": { - "pin.location": [-70, 40], - "order": "asc", - "unit": "km", - "mode": "min", - "distance_type": "arc", - "ignore_unmapped": True, - } - } - ], - "query": {"term": {"user": "kimchy"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/d1b3b7d2bb2ab90d15fd10318abd24db.asciidoc b/docs/examples/d1b3b7d2bb2ab90d15fd10318abd24db.asciidoc deleted file mode 100644 index 93a098bf4..000000000 --- a/docs/examples/d1b3b7d2bb2ab90d15fd10318abd24db.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -// search/request/sort.asciidoc:11 - -[source, python] ----- -resp = client.indices.create( - index="my_index", - body={ - "mappings": { - "properties": { - "post_date": {"type": "date"}, - "user": {"type": "keyword"}, - "name": {"type": "keyword"}, - "age": {"type": "integer"}, - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/d1bcf2eb63a462bfdcf01a68e68d5b4a.asciidoc b/docs/examples/d1bcf2eb63a462bfdcf01a68e68d5b4a.asciidoc deleted file mode 100644 index e9f58c93a..000000000 --- a/docs/examples/d1bcf2eb63a462bfdcf01a68e68d5b4a.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -// query-dsl/terms-query.asciidoc:186 - -[source, python] ----- -resp = client.search( - index="my_index", - pretty=True, - body={ - "query": { - "terms": { - "color": {"index": "my_index", "id": "2", "path": "color"} - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/d1fde25de1980b7e84fa878289fd0bcb.asciidoc b/docs/examples/d1fde25de1980b7e84fa878289fd0bcb.asciidoc new file mode 100644 index 000000000..eff030f5d --- /dev/null +++ b/docs/examples/d1fde25de1980b7e84fa878289fd0bcb.asciidoc @@ -0,0 +1,12 @@ +// docs/update-by-query.asciidoc:654 + +[source, python] +---- +resp = client.search( + index="my-index-000001", + size="0", + q="extra:test", + filter_path="hits.total", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/d2f52c106685bd8eab47e11d644d7a70.asciidoc b/docs/examples/d2f52c106685bd8eab47e11d644d7a70.asciidoc new file mode 100644 index 000000000..ed8d1fed2 --- /dev/null +++ b/docs/examples/d2f52c106685bd8eab47e11d644d7a70.asciidoc @@ -0,0 +1,37 @@ +// mapping/types/date.asciidoc:41 + +[source, python] +---- +resp = client.indices.create( + index="my-index-000001", + body={"mappings": {"properties": {"date": {"type": "date"}}}}, +) +print(resp) + +resp = client.index( + index="my-index-000001", + id="1", + body={"date": "2015-01-01"}, +) +print(resp) + +resp = client.index( + index="my-index-000001", + id="2", + body={"date": "2015-01-01T12:10:30Z"}, +) +print(resp) + +resp = client.index( + index="my-index-000001", + id="3", + body={"date": 1420070400001}, +) +print(resp) + +resp = client.search( + index="my-index-000001", + body={"sort": {"date": "asc"}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/d3016e4e8025362ad9a05ee86bb2061f.asciidoc b/docs/examples/d3016e4e8025362ad9a05ee86bb2061f.asciidoc deleted file mode 100644 index ac8a11dfb..000000000 --- a/docs/examples/d3016e4e8025362ad9a05ee86bb2061f.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/aliases.asciidoc:12 - -[source, python] ----- -resp = client.indices.update_aliases( - body={"actions": [{"add": {"index": "twitter", "alias": "alias1"}}]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/d3088d5fa59b3ab110f64fb4f9b0065c.asciidoc b/docs/examples/d3088d5fa59b3ab110f64fb4f9b0065c.asciidoc deleted file mode 100644 index 309f47107..000000000 --- a/docs/examples/d3088d5fa59b3ab110f64fb4f9b0065c.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// query-dsl/terms-query.asciidoc:145 - -[source, python] ----- -resp = client.index( - index="my_index", id="1", body={"color": ["blue", "green"]}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/58b5003c0a53a39bf509aa3797aad471.asciidoc b/docs/examples/d3dccdb15822e971ededb9f6f7d8ada1.asciidoc similarity index 85% rename from docs/examples/58b5003c0a53a39bf509aa3797aad471.asciidoc rename to docs/examples/d3dccdb15822e971ededb9f6f7d8ada1.asciidoc index 34589a139..1bbfe07e4 100644 --- a/docs/examples/58b5003c0a53a39bf509aa3797aad471.asciidoc +++ b/docs/examples/d3dccdb15822e971ededb9f6f7d8ada1.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:352 +// query-dsl/query-string-query.asciidoc:354 [source, python] ---- diff --git a/docs/examples/d4b4cefba4318caeba7480187faf2b13.asciidoc b/docs/examples/d4b4cefba4318caeba7480187faf2b13.asciidoc deleted file mode 100644 index 438bc1257..000000000 --- a/docs/examples/d4b4cefba4318caeba7480187faf2b13.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// query-dsl/term-query.asciidoc:113 - -[source, python] ----- -resp = client.index( - index="my_index", id="1", body={"full_text": "Quick Brown Foxes!"}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/d50a3c64890f88af32c6d4ef4899d82a.asciidoc b/docs/examples/d50a3c64890f88af32c6d4ef4899d82a.asciidoc deleted file mode 100644 index f94b44d83..000000000 --- a/docs/examples/d50a3c64890f88af32c6d4ef4899d82a.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// search/request/sort.asciidoc:470 - -[source, python] ----- -resp = client.search( - body={ - "sort": [ - { - "_geo_distance": { - "pin.location": "40,-70", - "order": "asc", - "unit": "km", - } - } - ], - "query": {"term": {"user": "kimchy"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/913770050ebbf3b9b549a899bc11060a.asciidoc b/docs/examples/d5533f08f5cc0479f07a46c761f0786b.asciidoc similarity index 84% rename from docs/examples/913770050ebbf3b9b549a899bc11060a.asciidoc rename to docs/examples/d5533f08f5cc0479f07a46c761f0786b.asciidoc index 8726f6542..d4621638e 100644 --- a/docs/examples/913770050ebbf3b9b549a899bc11060a.asciidoc +++ b/docs/examples/d5533f08f5cc0479f07a46c761f0786b.asciidoc @@ -1,9 +1,9 @@ -// docs/get.asciidoc:302 +// docs/get.asciidoc:321 [source, python] ---- resp = client.indices.create( - index="twitter", + index="my-index-000001", body={ "mappings": { "properties": { diff --git a/docs/examples/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc b/docs/examples/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc new file mode 100644 index 000000000..340279960 --- /dev/null +++ b/docs/examples/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc @@ -0,0 +1,15 @@ +// docs/reindex.asciidoc:742 + +[source, python] +---- +resp = client.reindex( + body={ + "source": { + "index": "my-index-000001", + "_source": ["user.id", "_doc"], + }, + "dest": {"index": "my-new-index-000001"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc b/docs/examples/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc deleted file mode 100644 index 023fe51e9..000000000 --- a/docs/examples/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// search/request/scroll.asciidoc:95 - -[source, python] ----- -resp = client.search(scroll="1m", body={"sort": ["_doc"]}) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/d718b63cf1b6591a1d59a0cf4fd995eb.asciidoc b/docs/examples/d718b63cf1b6591a1d59a0cf4fd995eb.asciidoc deleted file mode 100644 index e4259cb20..000000000 --- a/docs/examples/d718b63cf1b6591a1d59a0cf4fd995eb.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -// docs/index_.asciidoc:500 - -[source, python] ----- -resp = client.index( - index="twitter", - id="1", - op_type="create", - body={ - "user": "kimchy", - "post_date": "2009-11-15T14:12:12", - "message": "trying out Elasticsearch", - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/b93ed4ef309819734f0eeea82e8b0f1f.asciidoc b/docs/examples/d7f42d1b906dc406be1819d17c625d5f.asciidoc similarity index 78% rename from docs/examples/b93ed4ef309819734f0eeea82e8b0f1f.asciidoc rename to docs/examples/d7f42d1b906dc406be1819d17c625d5f.asciidoc index 76fce2894..c30eaee45 100644 --- a/docs/examples/b93ed4ef309819734f0eeea82e8b0f1f.asciidoc +++ b/docs/examples/d7f42d1b906dc406be1819d17c625d5f.asciidoc @@ -1,10 +1,11 @@ -// aggregations/bucket/filter-aggregation.asciidoc:9 +// aggregations/bucket/filter-aggregation.asciidoc:83 [source, python] ---- resp = client.search( index="sales", size="0", + filter_path="aggregations", body={ "aggs": { "t_shirts": { diff --git a/docs/examples/17de0020b228df961ad3c6b06233c948.asciidoc b/docs/examples/d7fe687201ac87b307cd06ed015dd317.asciidoc similarity index 72% rename from docs/examples/17de0020b228df961ad3c6b06233c948.asciidoc rename to docs/examples/d7fe687201ac87b307cd06ed015dd317.asciidoc index 00ffa368f..a7f044db0 100644 --- a/docs/examples/17de0020b228df961ad3c6b06233c948.asciidoc +++ b/docs/examples/d7fe687201ac87b307cd06ed015dd317.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:346 +// indices/put-mapping.asciidoc:282 [source, python] ---- resp = client.indices.put_mapping( - index="my_index", + index="my-index-000001", body={ "properties": {"user_id": {"type": "keyword", "ignore_above": 100}} }, diff --git a/docs/examples/d87175daed2327565d4325528c6d8b38.asciidoc b/docs/examples/d87175daed2327565d4325528c6d8b38.asciidoc new file mode 100644 index 000000000..dca82049e --- /dev/null +++ b/docs/examples/d87175daed2327565d4325528c6d8b38.asciidoc @@ -0,0 +1,10 @@ +// docs/get.asciidoc:229 + +[source, python] +---- +resp = client.get( + index="my-index-000001", + id="0", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/d8b115341da772a628a024e7d1644e73.asciidoc b/docs/examples/d8b115341da772a628a024e7d1644e73.asciidoc deleted file mode 100644 index be330b035..000000000 --- a/docs/examples/d8b115341da772a628a024e7d1644e73.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/update-by-query.asciidoc:327 - -[source, python] ----- -resp = client.update_by_query(index="twitter", routing="1") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/d8b2a88b5eca99d3691ad3cd40266736.asciidoc b/docs/examples/d8b2a88b5eca99d3691ad3cd40266736.asciidoc deleted file mode 100644 index bde826cc5..000000000 --- a/docs/examples/d8b2a88b5eca99d3691ad3cd40266736.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// mapping.asciidoc:147 - -[source, python] ----- -resp = client.indices.create( - index="my-index", - body={ - "mappings": { - "properties": { - "age": {"type": "integer"}, - "email": {"type": "keyword"}, - "name": {"type": "text"}, - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/d90a84a24a407731dfc1929ac8327746.asciidoc b/docs/examples/d90a84a24a407731dfc1929ac8327746.asciidoc deleted file mode 100644 index bad9a60fb..000000000 --- a/docs/examples/d90a84a24a407731dfc1929ac8327746.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/delete.asciidoc:127 - -[source, python] ----- -resp = client.delete(index="twitter", id="1", timeout="5m") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc b/docs/examples/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc new file mode 100644 index 000000000..99cd507e8 --- /dev/null +++ b/docs/examples/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc @@ -0,0 +1,19 @@ +// aggregations/bucket/datehistogram-aggregation.asciidoc:815 + +[source, python] +---- +resp = client.search( + index="sales", + size="0", + body={ + "runtime_mappings": { + "date.day_of_week": { + "type": "keyword", + "script": "emit(doc['date'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))", + } + }, + "aggs": {"day_of_week": {"terms": {"field": "date.day_of_week"}}}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/dbc50b8c934171e94604575a8b36f349.asciidoc b/docs/examples/dbc50b8c934171e94604575a8b36f349.asciidoc new file mode 100644 index 000000000..52bd9a8ac --- /dev/null +++ b/docs/examples/dbc50b8c934171e94604575a8b36f349.asciidoc @@ -0,0 +1,10 @@ +// indices/update-settings.asciidoc:135 + +[source, python] +---- +resp = client.indices.forcemerge( + index="my-index-000001", + max_num_segments="5", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/0d664883151008b1051ef2c9ab2d0373.asciidoc b/docs/examples/ddf56782ecc7eaeb3115e150c4830013.asciidoc similarity index 78% rename from docs/examples/0d664883151008b1051ef2c9ab2d0373.asciidoc rename to docs/examples/ddf56782ecc7eaeb3115e150c4830013.asciidoc index 0e924f24a..426c893d9 100644 --- a/docs/examples/0d664883151008b1051ef2c9ab2d0373.asciidoc +++ b/docs/examples/ddf56782ecc7eaeb3115e150c4830013.asciidoc @@ -1,9 +1,9 @@ -// docs/update-by-query.asciidoc:530 +// docs/update-by-query.asciidoc:585 [source, python] ---- resp = client.update_by_query( - index="twitter", + index="my-index-000001", body={ "slice": {"id": 0, "max": 2}, "script": {"source": "ctx._source['extra'] = 'test'"}, @@ -12,7 +12,7 @@ resp = client.update_by_query( print(resp) resp = client.update_by_query( - index="twitter", + index="my-index-000001", body={ "slice": {"id": 1, "max": 2}, "script": {"source": "ctx._source['extra'] = 'test'"}, diff --git a/docs/examples/de139866a220124360e5e27d1a736ea4.asciidoc b/docs/examples/de139866a220124360e5e27d1a736ea4.asciidoc deleted file mode 100644 index 10e173cea..000000000 --- a/docs/examples/de139866a220124360e5e27d1a736ea4.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// search/request/sort.asciidoc:262 - -[source, python] ----- -resp = client.search( - body={ - "query": {"term": {"product": "chocolate"}}, - "sort": [ - { - "offer.price": { - "mode": "avg", - "order": "asc", - "nested": { - "path": "offer", - "filter": {"term": {"offer.color": "blue"}}, - }, - } - } - ], - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/de176bc4788ea286fff9e92418a43ea8.asciidoc b/docs/examples/de176bc4788ea286fff9e92418a43ea8.asciidoc deleted file mode 100644 index b1b0db5ef..000000000 --- a/docs/examples/de176bc4788ea286fff9e92418a43ea8.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// indices/aliases.asciidoc:270 - -[source, python] ----- -resp = client.indices.create(index="test") -print(resp) - -resp = client.indices.create(index="test_2") -print(resp) - -resp = client.indices.update_aliases( - body={ - "actions": [ - {"add": {"index": "test_2", "alias": "test"}}, - {"remove_index": {"index": "test"}}, - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/4d46dbb96125b27f46299547de9d8709.asciidoc b/docs/examples/de876505acc75d371d1f6f484c449197.asciidoc similarity index 80% rename from docs/examples/4d46dbb96125b27f46299547de9d8709.asciidoc rename to docs/examples/de876505acc75d371d1f6f484c449197.asciidoc index 9805f1b88..9672928f5 100644 --- a/docs/examples/4d46dbb96125b27f46299547de9d8709.asciidoc +++ b/docs/examples/de876505acc75d371d1f6f484c449197.asciidoc @@ -1,4 +1,4 @@ -// indices/create-index.asciidoc:190 +// indices/create-index.asciidoc:251 [source, python] ---- diff --git a/docs/examples/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc b/docs/examples/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc new file mode 100644 index 000000000..45626d4d3 --- /dev/null +++ b/docs/examples/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc @@ -0,0 +1,53 @@ +// query-dsl/nested-query.asciidoc:298 + +[source, python] +---- +resp = client.indices.create( + index="my-index", + body={"mappings": {"properties": {"comments": {"type": "nested"}}}}, +) +print(resp) + +resp = client.index( + index="my-index", + id="1", + refresh=True, + body={"comments": [{"author": "kimchy"}]}, +) +print(resp) + +resp = client.index( + index="my-index", + id="2", + refresh=True, + body={"comments": [{"author": "kimchy"}, {"author": "nik9000"}]}, +) +print(resp) + +resp = client.index( + index="my-index", + id="3", + refresh=True, + body={"comments": [{"author": "nik9000"}]}, +) +print(resp) + +resp = client.search( + index="my-index", + body={ + "query": { + "nested": { + "path": "comments", + "query": { + "bool": { + "must_not": [ + {"term": {"comments.author": "nik9000"}} + ] + } + }, + } + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/dfac8d098b50aa0181161bcd17b38ef4.asciidoc b/docs/examples/dfac8d098b50aa0181161bcd17b38ef4.asciidoc deleted file mode 100644 index 2b6054f04..000000000 --- a/docs/examples/dfac8d098b50aa0181161bcd17b38ef4.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// indices/update-settings.asciidoc:97 - -[source, python] ----- -resp = client.indices.put_settings( - index="twitter", body={"index": {"refresh_interval": "-1"}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/dfb1fe96d806a644214d06f9b4b87878.asciidoc b/docs/examples/dfb1fe96d806a644214d06f9b4b87878.asciidoc deleted file mode 100644 index 96ea95ebf..000000000 --- a/docs/examples/dfb1fe96d806a644214d06f9b4b87878.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// docs/delete-by-query.asciidoc:394 - -[source, python] ----- -resp = client.delete_by_query( - index="twitter", - scroll_size="5000", - body={"query": {"term": {"user": "kimchy"}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/c612d93e7f682a0d731e385edf9f5d56.asciidoc b/docs/examples/dfcc83efefaddccfe5dce0695c2266ef.asciidoc similarity index 85% rename from docs/examples/c612d93e7f682a0d731e385edf9f5d56.asciidoc rename to docs/examples/dfcc83efefaddccfe5dce0695c2266ef.asciidoc index ea0fd2a74..6bcd2b4dc 100644 --- a/docs/examples/c612d93e7f682a0d731e385edf9f5d56.asciidoc +++ b/docs/examples/dfcc83efefaddccfe5dce0695c2266ef.asciidoc @@ -3,7 +3,7 @@ [source, python] ---- resp = client.indices.create( - index="my_index", + index="my-index-000001", body={"mappings": {"properties": {"obj1": {"type": "nested"}}}}, ) print(resp) diff --git a/docs/examples/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc b/docs/examples/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc new file mode 100644 index 000000000..58114c373 --- /dev/null +++ b/docs/examples/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc @@ -0,0 +1,26 @@ +// docs/reindex.asciidoc:234 + +[source, python] +---- +resp = client.reindex( + body={ + "source": { + "index": "my-index-000001", + "slice": {"id": 0, "max": 2}, + }, + "dest": {"index": "my-new-index-000001"}, + }, +) +print(resp) + +resp = client.reindex( + body={ + "source": { + "index": "my-index-000001", + "slice": {"id": 1, "max": 2}, + }, + "dest": {"index": "my-new-index-000001"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/e270f3f721a5712cd11a5ca03554f5b0.asciidoc b/docs/examples/e270f3f721a5712cd11a5ca03554f5b0.asciidoc index 7dad266e0..91cb762bf 100644 --- a/docs/examples/e270f3f721a5712cd11a5ca03554f5b0.asciidoc +++ b/docs/examples/e270f3f721a5712cd11a5ca03554f5b0.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/multi-match-query.asciidoc:170 +// query-dsl/multi-match-query.asciidoc:171 [source, python] ---- diff --git a/docs/examples/e316271f668c9889bf548311fb421f1e.asciidoc b/docs/examples/e316271f668c9889bf548311fb421f1e.asciidoc new file mode 100644 index 000000000..362979d8c --- /dev/null +++ b/docs/examples/e316271f668c9889bf548311fb421f1e.asciidoc @@ -0,0 +1,19 @@ +// aggregations/bucket/terms-aggregation.asciidoc:846 + +[source, python] +---- +resp = client.search( + body={ + "aggs": { + "ip_addresses": { + "terms": { + "field": "destination_ip", + "missing": "0.0.0.0", + "value_type": "ip", + } + } + } + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/e39d51202913bf6d861e9e721570cdb8.asciidoc b/docs/examples/e39d51202913bf6d861e9e721570cdb8.asciidoc new file mode 100644 index 000000000..a5e0c6327 --- /dev/null +++ b/docs/examples/e39d51202913bf6d861e9e721570cdb8.asciidoc @@ -0,0 +1,6 @@ +// query-dsl/nested-query.asciidoc:365 + +[source, python] +---- + +---- \ No newline at end of file diff --git a/docs/examples/e4be53736bcc02b03068fd72fdbfe271.asciidoc b/docs/examples/e4be53736bcc02b03068fd72fdbfe271.asciidoc index a16d7a68d..88590407f 100644 --- a/docs/examples/e4be53736bcc02b03068fd72fdbfe271.asciidoc +++ b/docs/examples/e4be53736bcc02b03068fd72fdbfe271.asciidoc @@ -1,9 +1,10 @@ -// indices/put-mapping.asciidoc:92 +// indices/put-mapping.asciidoc:108 [source, python] ---- resp = client.indices.put_mapping( - index="publications", body={"properties": {"title": {"type": "text"}}}, + index="publications", + body={"properties": {"title": {"type": "text"}}}, ) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/e567e6dbf86300142573c73789c8fce4.asciidoc b/docs/examples/e567e6dbf86300142573c73789c8fce4.asciidoc deleted file mode 100644 index e14b59758..000000000 --- a/docs/examples/e567e6dbf86300142573c73789c8fce4.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -// docs/reindex.asciidoc:276 - -[source, python] ----- -resp = client.search( - index="new_twitter", size="0", filter_path="hits.total", -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/e58833449d01379df20ad06dc28144d8.asciidoc b/docs/examples/e58833449d01379df20ad06dc28144d8.asciidoc new file mode 100644 index 000000000..d78f231c3 --- /dev/null +++ b/docs/examples/e58833449d01379df20ad06dc28144d8.asciidoc @@ -0,0 +1,11 @@ +// docs/update-by-query.asciidoc:325 + +[source, python] +---- +resp = client.update_by_query( + index="my-index-000001", + conflicts="proceed", + body={"query": {"term": {"user.id": "kimchy"}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/e5f50b31f165462d883ecbff45f74985.asciidoc b/docs/examples/e5f50b31f165462d883ecbff45f74985.asciidoc deleted file mode 100644 index 4a0642161..000000000 --- a/docs/examples/e5f50b31f165462d883ecbff45f74985.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// indices/templates.asciidoc:20 - -[source, python] ----- -resp = client.indices.put_template( - name="template_1", - body={ - "index_patterns": ["te*", "bar*"], - "settings": {"number_of_shards": 1}, - "mappings": { - "_source": {"enabled": False}, - "properties": { - "host_name": {"type": "keyword"}, - "created_at": { - "type": "date", - "format": "EEE MMM dd HH:mm:ss Z yyyy", - }, - }, - }, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/8fdf2344c4fb3de6902ad7c5735270df.asciidoc b/docs/examples/e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc similarity index 71% rename from docs/examples/8fdf2344c4fb3de6902ad7c5735270df.asciidoc rename to docs/examples/e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc index 1d7adefe8..64b6234ea 100644 --- a/docs/examples/8fdf2344c4fb3de6902ad7c5735270df.asciidoc +++ b/docs/examples/e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc @@ -1,9 +1,9 @@ -// docs/get.asciidoc:65 +// docs/get.asciidoc:71 [source, python] ---- resp = client.get( - index="twitter", + index="my-index-000001", id="0", _source_includes="*.id", _source_excludes="entities", diff --git a/docs/examples/35e8da9410b8432cf4095f2541ad7b1d.asciidoc b/docs/examples/e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc similarity index 85% rename from docs/examples/35e8da9410b8432cf4095f2541ad7b1d.asciidoc rename to docs/examples/e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc index a2443e5e5..dc1e7364b 100644 --- a/docs/examples/35e8da9410b8432cf4095f2541ad7b1d.asciidoc +++ b/docs/examples/e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:162 +// aggregations/bucket/terms-aggregation.asciidoc:185 [source, python] ---- diff --git a/docs/examples/e63775a2ff22b945ab9d5f630b80c506.asciidoc b/docs/examples/e63775a2ff22b945ab9d5f630b80c506.asciidoc new file mode 100644 index 000000000..021d8f261 --- /dev/null +++ b/docs/examples/e63775a2ff22b945ab9d5f630b80c506.asciidoc @@ -0,0 +1,10 @@ +// cluster/health.asciidoc:192 + +[source, python] +---- +resp = client.cluster.health( + index="my-index-000001", + level="shards", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/8871b8fcb6de4f0c7dff22798fb10fb7.asciidoc b/docs/examples/e650d73c57ab313e686fec01e3b0c90f.asciidoc similarity index 56% rename from docs/examples/8871b8fcb6de4f0c7dff22798fb10fb7.asciidoc rename to docs/examples/e650d73c57ab313e686fec01e3b0c90f.asciidoc index 7dae163c3..dd12d14ca 100644 --- a/docs/examples/8871b8fcb6de4f0c7dff22798fb10fb7.asciidoc +++ b/docs/examples/e650d73c57ab313e686fec01e3b0c90f.asciidoc @@ -1,11 +1,14 @@ -// docs/reindex.asciidoc:846 +// docs/reindex.asciidoc:909 [source, python] ---- resp = client.reindex( body={ - "source": {"index": "twitter"}, - "dest": {"index": "new_twitter", "version_type": "external"}, + "source": {"index": "my-index-000001"}, + "dest": { + "index": "my-new-index-000001", + "version_type": "external", + }, "script": { "source": "if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}", "lang": "painless", diff --git a/docs/examples/8de3206f80e18185a5ad6481f4c2ee07.asciidoc b/docs/examples/e6b972611c0ec8ab4c240f33f323d85b.asciidoc similarity index 79% rename from docs/examples/8de3206f80e18185a5ad6481f4c2ee07.asciidoc rename to docs/examples/e6b972611c0ec8ab4c240f33f323d85b.asciidoc index 75fc7c7c3..8dac1cb20 100644 --- a/docs/examples/8de3206f80e18185a5ad6481f4c2ee07.asciidoc +++ b/docs/examples/e6b972611c0ec8ab4c240f33f323d85b.asciidoc @@ -1,9 +1,9 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:431 +// aggregations/bucket/datehistogram-aggregation.asciidoc:417 [source, python] ---- resp = client.search( - index="my_index", + index="my-index-000001", size="0", body={ "aggs": { diff --git a/docs/examples/5dd695679b5141d9142d3d30ba8d300a.asciidoc b/docs/examples/e7eca57a5bf5a53cbbe2463bce11495b.asciidoc similarity index 74% rename from docs/examples/5dd695679b5141d9142d3d30ba8d300a.asciidoc rename to docs/examples/e7eca57a5bf5a53cbbe2463bce11495b.asciidoc index 18a82e4d0..0326a638f 100644 --- a/docs/examples/5dd695679b5141d9142d3d30ba8d300a.asciidoc +++ b/docs/examples/e7eca57a5bf5a53cbbe2463bce11495b.asciidoc @@ -1,4 +1,4 @@ -// aggregations/metrics/valuecount-aggregation.asciidoc:13 +// aggregations/metrics/valuecount-aggregation.asciidoc:15 [source, python] ---- diff --git a/docs/examples/5f3a3eefeefe6fa85ec49d499212d245.asciidoc b/docs/examples/e821d27a8b810821707ba860e31f8b78.asciidoc similarity index 79% rename from docs/examples/5f3a3eefeefe6fa85ec49d499212d245.asciidoc rename to docs/examples/e821d27a8b810821707ba860e31f8b78.asciidoc index 1ac60e99e..64b2d235f 100644 --- a/docs/examples/5f3a3eefeefe6fa85ec49d499212d245.asciidoc +++ b/docs/examples/e821d27a8b810821707ba860e31f8b78.asciidoc @@ -1,9 +1,9 @@ -// indices/put-mapping.asciidoc:257 +// indices/put-mapping.asciidoc:232 [source, python] ---- resp = client.indices.put_mapping( - index="my_index", + index="my-index-000001", body={ "properties": { "city": { diff --git a/docs/examples/4d56b179242fed59e3d6476f817b6055.asciidoc b/docs/examples/e84e23232c7ecc8d6377ec2c16a60269.asciidoc similarity index 60% rename from docs/examples/4d56b179242fed59e3d6476f817b6055.asciidoc rename to docs/examples/e84e23232c7ecc8d6377ec2c16a60269.asciidoc index a57680e16..ba2798df6 100644 --- a/docs/examples/4d56b179242fed59e3d6476f817b6055.asciidoc +++ b/docs/examples/e84e23232c7ecc8d6377ec2c16a60269.asciidoc @@ -1,4 +1,4 @@ -// indices/create-index.asciidoc:143 +// indices/create-index.asciidoc:192 [source, python] ---- @@ -8,8 +8,8 @@ resp = client.indices.create( "aliases": { "alias_1": {}, "alias_2": { - "filter": {"term": {"user": "kimchy"}}, - "routing": "kimchy", + "filter": {"term": {"user.id": "kimchy"}}, + "routing": "shard-1", }, } }, diff --git a/docs/examples/e891e1d4805172da45a81f62b6b44aca.asciidoc b/docs/examples/e891e1d4805172da45a81f62b6b44aca.asciidoc new file mode 100644 index 000000000..918d59a2e --- /dev/null +++ b/docs/examples/e891e1d4805172da45a81f62b6b44aca.asciidoc @@ -0,0 +1,18 @@ +// aggregations/bucket/terms-aggregation.asciidoc:464 + +[source, python] +---- +resp = client.search( + body={ + "size": 0, + "runtime_mappings": { + "normalized_genre": { + "type": "keyword", + "script": "\n String genre = doc['genre'].value;\n if (doc['product'].value.startsWith('Anthology')) {\n emit(genre + ' anthology');\n } else {\n emit(genre);\n }\n ", + } + }, + "aggs": {"genres": {"terms": {"field": "normalized_genre"}}}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/3342c69b2c2303247217532956fcce85.asciidoc b/docs/examples/e8cbe2269f3dff6b231e73119e81511d.asciidoc similarity index 50% rename from docs/examples/3342c69b2c2303247217532956fcce85.asciidoc rename to docs/examples/e8cbe2269f3dff6b231e73119e81511d.asciidoc index 8b1e463d2..2cffa2aaf 100644 --- a/docs/examples/3342c69b2c2303247217532956fcce85.asciidoc +++ b/docs/examples/e8cbe2269f3dff6b231e73119e81511d.asciidoc @@ -2,6 +2,8 @@ [source, python] ---- -resp = client.search(body={"query": {"exists": {"field": "user"}}}) +resp = client.search( + body={"query": {"exists": {"field": "user"}}}, +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/e8e451bc8c45bcf16df43804c4fc8329.asciidoc b/docs/examples/e8e451bc8c45bcf16df43804c4fc8329.asciidoc deleted file mode 100644 index e1a69a855..000000000 --- a/docs/examples/e8e451bc8c45bcf16df43804c4fc8329.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -// search/request/sort.asciidoc:597 - -[source, python] ----- -resp = client.search( - body={ - "track_scores": True, - "sort": [ - {"post_date": {"order": "desc"}}, - {"name": "desc"}, - {"age": "desc"}, - ], - "query": {"term": {"user": "kimchy"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/e9c2e15b36372d5281c879d336322b6c.asciidoc b/docs/examples/e9c2e15b36372d5281c879d336322b6c.asciidoc deleted file mode 100644 index d3f83dd55..000000000 --- a/docs/examples/e9c2e15b36372d5281c879d336322b6c.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// docs/reindex.asciidoc:679 - -[source, python] ----- -resp = client.reindex( - body={ - "source": {"index": "twitter", "_source": ["user", "_doc"]}, - "dest": {"index": "new_twitter"}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/e9f9e184499a793828233e536fac0487.asciidoc b/docs/examples/e9f9e184499a793828233e536fac0487.asciidoc new file mode 100644 index 000000000..4b8857073 --- /dev/null +++ b/docs/examples/e9f9e184499a793828233e536fac0487.asciidoc @@ -0,0 +1,11 @@ +// docs/delete-by-query.asciidoc:412 + +[source, python] +---- +resp = client.delete_by_query( + index="my-index-000001", + scroll_size="5000", + body={"query": {"term": {"user.id": "kimchy"}}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/ea5391267ced860c00214c096e08c8d4.asciidoc b/docs/examples/ea5391267ced860c00214c096e08c8d4.asciidoc new file mode 100644 index 000000000..e1d9a8887 --- /dev/null +++ b/docs/examples/ea5391267ced860c00214c096e08c8d4.asciidoc @@ -0,0 +1,10 @@ +// indices/update-settings.asciidoc:13 + +[source, python] +---- +resp = client.indices.put_settings( + index="my-index-000001", + body={"index": {"number_of_replicas": 2}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/e9fe608f105d7e3268a15e409e2cb9ab.asciidoc b/docs/examples/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc similarity index 92% rename from docs/examples/e9fe608f105d7e3268a15e409e2cb9ab.asciidoc rename to docs/examples/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc index e39d9da2f..aced2c895 100644 --- a/docs/examples/e9fe608f105d7e3268a15e409e2cb9ab.asciidoc +++ b/docs/examples/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc @@ -1,4 +1,4 @@ -// aggregations/metrics/valuecount-aggregation.asciidoc:96 +// aggregations/metrics/valuecount-aggregation.asciidoc:97 [source, python] ---- diff --git a/docs/examples/eb30ba547e4a7b8f54f33ab259aca523.asciidoc b/docs/examples/eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc similarity index 85% rename from docs/examples/eb30ba547e4a7b8f54f33ab259aca523.asciidoc rename to docs/examples/eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc index 83d427bd6..56d4c5206 100644 --- a/docs/examples/eb30ba547e4a7b8f54f33ab259aca523.asciidoc +++ b/docs/examples/eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc @@ -1,4 +1,4 @@ -// docs/update.asciidoc:153 +// docs/update.asciidoc:172 [source, python] ---- diff --git a/docs/examples/9524a9b7373fa4eb2905183b0e806962.asciidoc b/docs/examples/ecc57597f6b791d1151ad79d9f4ce67b.asciidoc similarity index 86% rename from docs/examples/9524a9b7373fa4eb2905183b0e806962.asciidoc rename to docs/examples/ecc57597f6b791d1151ad79d9f4ce67b.asciidoc index 3b1e037c5..415bcd506 100644 --- a/docs/examples/9524a9b7373fa4eb2905183b0e806962.asciidoc +++ b/docs/examples/ecc57597f6b791d1151ad79d9f4ce67b.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:567 +// aggregations/bucket/datehistogram-aggregation.asciidoc:642 [source, python] ---- diff --git a/docs/examples/b4a0d0ed512dffc10ee53bca2feca49b.asciidoc b/docs/examples/edcfadbfb14d97a2f5e6e21ef7039818.asciidoc similarity index 100% rename from docs/examples/b4a0d0ed512dffc10ee53bca2feca49b.asciidoc rename to docs/examples/edcfadbfb14d97a2f5e6e21ef7039818.asciidoc diff --git a/docs/examples/ef0f4fa4272c47ff62fb7b422cf975e7.asciidoc b/docs/examples/ef0f4fa4272c47ff62fb7b422cf975e7.asciidoc deleted file mode 100644 index 7e4ab4119..000000000 --- a/docs/examples/ef0f4fa4272c47ff62fb7b422cf975e7.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -// search/request/sort.asciidoc:345 - -[source, python] ----- -resp = client.search( - body={ - "sort": [{"price": {"missing": "_last"}}], - "query": {"term": {"product": "chocolate"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc b/docs/examples/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc new file mode 100644 index 000000000..f15b999cc --- /dev/null +++ b/docs/examples/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc @@ -0,0 +1,13 @@ +// docs/reindex.asciidoc:694 + +[source, python] +---- +resp = client.reindex( + body={ + "max_docs": 1, + "source": {"index": "my-index-000001"}, + "dest": {"index": "my-new-index-000001"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc b/docs/examples/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc new file mode 100644 index 000000000..27719ab27 --- /dev/null +++ b/docs/examples/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc @@ -0,0 +1,26 @@ +// aggregations/bucket/datehistogram-aggregation.asciidoc:698 + +[source, python] +---- +resp = client.search( + index="sales", + size="0", + body={ + "runtime_mappings": { + "date.promoted_is_tomorrow": { + "type": "date", + "script": "\n long date = doc['date'].value.toInstant().toEpochMilli();\n if (doc['promoted'].value) {\n date += 86400;\n }\n emit(date);\n ", + } + }, + "aggs": { + "sales_over_time": { + "date_histogram": { + "field": "date.promoted_is_tomorrow", + "calendar_interval": "1M", + } + } + }, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/ef9111c1648d7820925f12e07d1346c5.asciidoc b/docs/examples/ef9111c1648d7820925f12e07d1346c5.asciidoc deleted file mode 100644 index 1382688f3..000000000 --- a/docs/examples/ef9111c1648d7820925f12e07d1346c5.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -// mapping/params/fielddata.asciidoc:56 - -[source, python] ----- -resp = client.indices.create( - index="my_index", - body={ - "mappings": { - "properties": { - "my_field": { - "type": "text", - "fields": {"keyword": {"type": "keyword"}}, - } - } - } - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/a42f33e15b0995bb4b6058659bfdea85.asciidoc b/docs/examples/eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc similarity index 100% rename from docs/examples/a42f33e15b0995bb4b6058659bfdea85.asciidoc rename to docs/examples/eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc diff --git a/docs/examples/f0e21e03a07c8fa0209b0aafdb3791e6.asciidoc b/docs/examples/f0e21e03a07c8fa0209b0aafdb3791e6.asciidoc deleted file mode 100644 index 0d19cfb4f..000000000 --- a/docs/examples/f0e21e03a07c8fa0209b0aafdb3791e6.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// indices/aliases.asciidoc:218 - -[source, python] ----- -resp = client.indices.update_aliases( - body={ - "actions": [ - {"add": {"index": "test1", "alias": "alias1"}}, - {"add": {"index": "test2", "alias": "alias1"}}, - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc b/docs/examples/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc index aeb682446..13ead280a 100644 --- a/docs/examples/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc +++ b/docs/examples/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc @@ -1,4 +1,4 @@ -// query-dsl/query-string-query.asciidoc:418 +// query-dsl/query-string-query.asciidoc:420 [source, python] ---- diff --git a/docs/examples/f37173a75cd1b0d683c6f67819dd1de3.asciidoc b/docs/examples/f37173a75cd1b0d683c6f67819dd1de3.asciidoc new file mode 100644 index 000000000..3894e149a --- /dev/null +++ b/docs/examples/f37173a75cd1b0d683c6f67819dd1de3.asciidoc @@ -0,0 +1,10 @@ +// docs/reindex.asciidoc:794 + +[source, python] +---- +resp = client.get( + index="my-new-index-000001", + id="1", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/2bb2339ac055337abf753bddb7771659.asciidoc b/docs/examples/f43d551aaaad73d979adf1b86533e6a3.asciidoc similarity index 81% rename from docs/examples/2bb2339ac055337abf753bddb7771659.asciidoc rename to docs/examples/f43d551aaaad73d979adf1b86533e6a3.asciidoc index 65f780dc5..ec5dce6cc 100644 --- a/docs/examples/2bb2339ac055337abf753bddb7771659.asciidoc +++ b/docs/examples/f43d551aaaad73d979adf1b86533e6a3.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:232 +// aggregations/bucket/datehistogram-aggregation.asciidoc:216 [source, python] ---- diff --git a/docs/examples/4d6997c70a1851f9151443c0d38b532e.asciidoc b/docs/examples/f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc similarity index 81% rename from docs/examples/4d6997c70a1851f9151443c0d38b532e.asciidoc rename to docs/examples/f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc index ab54bb78d..038287668 100644 --- a/docs/examples/4d6997c70a1851f9151443c0d38b532e.asciidoc +++ b/docs/examples/f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc @@ -3,7 +3,7 @@ [source, python] ---- resp = client.index( - index="my_index", + index="my-index-000001", id="1", body={ "message": "some arrays in this document...", @@ -17,7 +17,7 @@ resp = client.index( print(resp) resp = client.index( - index="my_index", + index="my-index-000001", id="2", body={ "message": "no arrays in this document...", @@ -28,7 +28,8 @@ resp = client.index( print(resp) resp = client.search( - index="my_index", body={"query": {"match": {"tags": "elasticsearch"}}}, + index="my-index-000001", + body={"query": {"match": {"tags": "elasticsearch"}}}, ) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/34efeade38445b2834749ced59782e25.asciidoc b/docs/examples/f495f9c99916a05e3b28166d31955fad.asciidoc similarity index 88% rename from docs/examples/34efeade38445b2834749ced59782e25.asciidoc rename to docs/examples/f495f9c99916a05e3b28166d31955fad.asciidoc index 971f9fe4a..66fa23f1f 100644 --- a/docs/examples/34efeade38445b2834749ced59782e25.asciidoc +++ b/docs/examples/f495f9c99916a05e3b28166d31955fad.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/terms-aggregation.asciidoc:263 +// aggregations/bucket/terms-aggregation.asciidoc:292 [source, python] ---- diff --git a/docs/examples/f4a1008b3f9baa67bb03ce9ef5ab4cb4.asciidoc b/docs/examples/f4a1008b3f9baa67bb03ce9ef5ab4cb4.asciidoc deleted file mode 100644 index ccd1fec91..000000000 --- a/docs/examples/f4a1008b3f9baa67bb03ce9ef5ab4cb4.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// search/request/sort.asciidoc:180 - -[source, python] ----- -resp = client.indices.create( - index="index_double", - body={"mappings": {"properties": {"field": {"type": "date"}}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/f4f557716049b23f8840d58d71e748f0.asciidoc b/docs/examples/f4f557716049b23f8840d58d71e748f0.asciidoc new file mode 100644 index 000000000..58121f69e --- /dev/null +++ b/docs/examples/f4f557716049b23f8840d58d71e748f0.asciidoc @@ -0,0 +1,10 @@ +// indices/update-settings.asciidoc:105 + +[source, python] +---- +resp = client.indices.put_settings( + index="my-index-000001", + body={"index": {"refresh_interval": "-1"}}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/73e5c88ad1488b213fb278ee1cb42289.asciidoc b/docs/examples/f5815d573cee0447910c9668003887b8.asciidoc similarity index 84% rename from docs/examples/73e5c88ad1488b213fb278ee1cb42289.asciidoc rename to docs/examples/f5815d573cee0447910c9668003887b8.asciidoc index 635b0c2c8..1d2c30486 100644 --- a/docs/examples/73e5c88ad1488b213fb278ee1cb42289.asciidoc +++ b/docs/examples/f5815d573cee0447910c9668003887b8.asciidoc @@ -1,4 +1,4 @@ -// aggregations/bucket/datehistogram-aggregation.asciidoc:138 +// aggregations/bucket/datehistogram-aggregation.asciidoc:122 [source, python] ---- diff --git a/docs/examples/f6b5032bf27c2445d28845be0d413970.asciidoc b/docs/examples/f6b5032bf27c2445d28845be0d413970.asciidoc deleted file mode 100644 index 7e825134b..000000000 --- a/docs/examples/f6b5032bf27c2445d28845be0d413970.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// search/request/sort.asciidoc:134 - -[source, python] ----- -resp = client.indices.create( - index="index_long", - body={"mappings": {"properties": {"field": {"type": "long"}}}}, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/f6d6889667f56b8f49d2858070571a6b.asciidoc b/docs/examples/f6d6889667f56b8f49d2858070571a6b.asciidoc deleted file mode 100644 index c16cef51d..000000000 --- a/docs/examples/f6d6889667f56b8f49d2858070571a6b.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// indices/aliases.asciidoc:409 - -[source, python] ----- -resp = client.indices.update_aliases( - body={ - "actions": [ - { - "add": { - "index": "test", - "alias": "alias1", - "is_write_index": True, - } - }, - {"add": {"index": "test2", "alias": "alias1"}}, - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/06afce2955f9094d96d27067ebca32e8.asciidoc b/docs/examples/f8a0010753b1ff563dc42d703902d2fa.asciidoc similarity index 63% rename from docs/examples/06afce2955f9094d96d27067ebca32e8.asciidoc rename to docs/examples/f8a0010753b1ff563dc42d703902d2fa.asciidoc index 69960332a..59cc902c7 100644 --- a/docs/examples/06afce2955f9094d96d27067ebca32e8.asciidoc +++ b/docs/examples/f8a0010753b1ff563dc42d703902d2fa.asciidoc @@ -6,12 +6,12 @@ resp = client.search( body={ "query": { "bool": { - "must": {"term": {"user": "kimchy"}}, - "filter": {"term": {"tag": "tech"}}, + "must": {"term": {"user.id": "kimchy"}}, + "filter": {"term": {"tags": "production"}}, "must_not": {"range": {"age": {"gte": 10, "lte": 20}}}, "should": [ - {"term": {"tag": "wow"}}, - {"term": {"tag": "elasticsearch"}}, + {"term": {"tags": "env1"}}, + {"term": {"tags": "deployed"}}, ], "minimum_should_match": 1, "boost": 1, diff --git a/docs/examples/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc b/docs/examples/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc deleted file mode 100644 index e1d203441..000000000 --- a/docs/examples/f8cc4b331a19ff4df8e4a490f906ee69.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// getting-started.asciidoc:167 - -[source, python] ----- -resp = client.cat.health(v=True) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/f9636d7ef1a45be4f36418c875cf6bef.asciidoc b/docs/examples/f9636d7ef1a45be4f36418c875cf6bef.asciidoc deleted file mode 100644 index d862bbae3..000000000 --- a/docs/examples/f9636d7ef1a45be4f36418c875cf6bef.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// docs/update.asciidoc:296 - -[source, python] ----- -resp = client.update( - index="sessions", - id="dh3sgudg8gsrgl", - body={ - "scripted_upsert": True, - "script": { - "id": "my_web_session_summariser", - "params": { - "pageViewEvent": { - "url": "foo.com/bar", - "response": 404, - "time": "2014-01-01 12:32", - } - }, - }, - "upsert": {}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/f9c8245cc13770dff052b6759a749efa.asciidoc b/docs/examples/f9c8245cc13770dff052b6759a749efa.asciidoc new file mode 100644 index 000000000..a9e222c93 --- /dev/null +++ b/docs/examples/f9c8245cc13770dff052b6759a749efa.asciidoc @@ -0,0 +1,10 @@ +// docs/get.asciidoc:288 + +[source, python] +---- +resp = client.get_source( + index="my-index-000001", + id="1", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/fa0f4485cd48f986b7ae8cbb24e331c4.asciidoc b/docs/examples/fa0f4485cd48f986b7ae8cbb24e331c4.asciidoc deleted file mode 100644 index f641e99b4..000000000 --- a/docs/examples/fa0f4485cd48f986b7ae8cbb24e331c4.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -// indices/aliases.asciidoc:362 - -[source, python] ----- -resp = client.indices.update_aliases( - body={ - "actions": [ - { - "add": { - "index": "test", - "alias": "alias2", - "search_routing": "1,2", - "index_routing": "2", - } - } - ] - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/fabe14480624a99e8ee42c7338672058.asciidoc b/docs/examples/fabe14480624a99e8ee42c7338672058.asciidoc index f1c7b4175..3b557b431 100644 --- a/docs/examples/fabe14480624a99e8ee42c7338672058.asciidoc +++ b/docs/examples/fabe14480624a99e8ee42c7338672058.asciidoc @@ -1,7 +1,10 @@ -// indices/create-index.asciidoc:203 +// indices/create-index.asciidoc:264 [source, python] ---- -resp = client.indices.create(index="test", wait_for_active_shards="2") +resp = client.indices.create( + index="test", + wait_for_active_shards="2", +) print(resp) ---- \ No newline at end of file diff --git a/docs/examples/645c4c6e209719d3a4d25b1a629cb23b.asciidoc b/docs/examples/fad524db23eb5718ff310956e590b00d.asciidoc similarity index 100% rename from docs/examples/645c4c6e209719d3a4d25b1a629cb23b.asciidoc rename to docs/examples/fad524db23eb5718ff310956e590b00d.asciidoc diff --git a/docs/examples/fbcf5078a6a9e09790553804054c36b3.asciidoc b/docs/examples/fbcf5078a6a9e09790553804054c36b3.asciidoc deleted file mode 100644 index 73457900f..000000000 --- a/docs/examples/fbcf5078a6a9e09790553804054c36b3.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// docs/get.asciidoc:224 - -[source, python] ----- -resp = client.get(index="twitter", id="0") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/fdcaba9547180439ff4b6275034a5170.asciidoc b/docs/examples/fdcaba9547180439ff4b6275034a5170.asciidoc deleted file mode 100644 index b143cb7bb..000000000 --- a/docs/examples/fdcaba9547180439ff4b6275034a5170.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -// search/request/scroll.asciidoc:268 - -[source, python] ----- -resp = client.search( - index="twitter", - scroll="1m", - body={ - "slice": {"field": "date", "id": 0, "max": 10}, - "query": {"match": {"title": "elasticsearch"}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/fe5763d32955e8b65eb3048e97b1580c.asciidoc b/docs/examples/fe5763d32955e8b65eb3048e97b1580c.asciidoc deleted file mode 100644 index a2e92d9ed..000000000 --- a/docs/examples/fe5763d32955e8b65eb3048e97b1580c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -// indices/update-settings.asciidoc:127 - -[source, python] ----- -resp = client.indices.forcemerge(index="twitter", max_num_segments="5") -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc b/docs/examples/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc new file mode 100644 index 000000000..7abdde28e --- /dev/null +++ b/docs/examples/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc @@ -0,0 +1,22 @@ +// mapping/types/date.asciidoc:250 + +[source, python] +---- +resp = client.indices.create( + index="idx", + body={ + "mappings": { + "_source": {"mode": "synthetic"}, + "properties": {"date": {"type": "date"}}, + } + }, +) +print(resp) + +resp = client.index( + index="idx", + id="1", + body={"date": ["2015-01-01T12:10:30Z", "2014-01-01T12:10:30Z"]}, +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/fe806011466e7cdc1590da186297edb6.asciidoc b/docs/examples/fe806011466e7cdc1590da186297edb6.asciidoc new file mode 100644 index 000000000..a01ae87e3 --- /dev/null +++ b/docs/examples/fe806011466e7cdc1590da186297edb6.asciidoc @@ -0,0 +1,9 @@ +// api-conventions.asciidoc:119 + +[source, python] +---- +resp = client.indices.create( + index="", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/feefeb68144002fd1fff57b77b95b85e.asciidoc b/docs/examples/feefeb68144002fd1fff57b77b95b85e.asciidoc deleted file mode 100644 index d4afd1639..000000000 --- a/docs/examples/feefeb68144002fd1fff57b77b95b85e.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// getting-started.asciidoc:578 - -[source, python] ----- -resp = client.search( - index="bank", - body={ - "size": 0, - "aggs": {"group_by_state": {"terms": {"field": "state.keyword"}}}, - }, -) -print(resp) ----- \ No newline at end of file diff --git a/docs/examples/ff09e13391cecb2e8b9dd440b37e065f.asciidoc b/docs/examples/ff09e13391cecb2e8b9dd440b37e065f.asciidoc new file mode 100644 index 000000000..c62f8d3bf --- /dev/null +++ b/docs/examples/ff09e13391cecb2e8b9dd440b37e065f.asciidoc @@ -0,0 +1,11 @@ +// docs/reindex.asciidoc:310 + +[source, python] +---- +resp = client.search( + index="my-new-index-000001", + size="0", + filter_path="hits.total", +) +print(resp) +---- \ No newline at end of file diff --git a/docs/examples/ff63ae39c34925dbfa54282ec9989124.asciidoc b/docs/examples/ff63ae39c34925dbfa54282ec9989124.asciidoc new file mode 100644 index 000000000..5902847db --- /dev/null +++ b/docs/examples/ff63ae39c34925dbfa54282ec9989124.asciidoc @@ -0,0 +1,19 @@ +// docs/reindex.asciidoc:1003 + +[source, python] +---- +resp = client.reindex( + body={ + "source": { + "remote": { + "host": "http://otherhost:9200", + "headers": {"Authorization": "ApiKey API_KEY_VALUE"}, + }, + "index": "my-index-000001", + "query": {"match": {"test": "data"}}, + }, + "dest": {"index": "my-new-index-000001"}, + }, +) +print(resp) +---- \ No newline at end of file diff --git a/utils/generate-examples.py b/utils/generate-examples.py index d5a3199c7..8893db914 100644 --- a/utils/generate-examples.py +++ b/utils/generate-examples.py @@ -109,7 +109,7 @@ def blacken(filename): runner = CliRunner() result = runner.invoke( - black.main, [str(filename), "--line-length=75", "--target-version=py27"] + black.main, [str(filename), "--line-length=75", "--target-version=py37"] ) assert result.exit_code == 0, result.output diff --git a/utils/templates/example b/utils/templates/example new file mode 100644 index 000000000..e39eca931 --- /dev/null +++ b/utils/templates/example @@ -0,0 +1,12 @@ +{% for src in parsed_sources %} +resp = client.{{ src.api }}( +{% for key, val in src.params.items() %} + {{ key }}={{ val }}, +{% endfor %} +{% if src.body %} + body={{ src.body }}, +{% endif %} +) +print(resp) + +{% endfor %} \ No newline at end of file From bcf53d1272f3a16adf720c7b73b7793f0f726bb9 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 26 Sep 2023 10:58:42 +0400 Subject: [PATCH 2/2] Stop using mktemp It is insecure, though not in this specific context, but tools are flagging this. --- utils/generate-examples.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/utils/generate-examples.py b/utils/generate-examples.py index 8893db914..3efe37d98 100644 --- a/utils/generate-examples.py +++ b/utils/generate-examples.py @@ -19,6 +19,7 @@ import collections import json +import os import tempfile from pathlib import Path @@ -154,16 +155,16 @@ def main(): ) ) - tmp_path = Path(tempfile.mktemp()) - with tmp_path.open(mode="w") as f: - f.write(t.render(parsed_sources=parsed_sources)) + with tempfile.NamedTemporaryFile("w+", delete=False) as tmp_file: + tmp_file.write(t.render(parsed_sources=parsed_sources)) - blacken(tmp_path) + blacken(tmp_file.name) - with tmp_path.open(mode="r") as f: + with open(tmp_file.name) as f: data = f.read() - data = data.rstrip().replace(",)", ")") - tmp_path.unlink() + data = data.rstrip().replace(",)", ")") + + os.unlink(tmp_file.name) with (asciidocs_dir / f"{exm['digest']}.asciidoc").open(mode="w") as f: f.truncate()