Created
December 2, 2012 10:17
-
-
Save jaromirmuller/4188055 to your computer and use it in GitHub Desktop.
ES Create Testing Index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE 'http://localhost:9200/test_index/' | |
curl -XPUT 'http://localhost:9200/test_index/' -d '{"number_of_shards":4,"number_of_replicas":1,"analysis":{"analyzer":{"indexAnalyzer":{"type":"custom","tokenizer":"standard","filter":["lowercase","mySnowball"]},"searchAnalyzer":{"type":"custom","tokenizer":"standard","filter":["standard","lowercase","mySnowball"]}},"filter":{"mySnowball":{"type":"snowball","language":"German"}}}}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/_mapping' -d '{"test_type":{"index_analyzer":"indexAnalyzer","search_analyzer":"searchAnalyzer","_boost":{"name":"_boost","null_value":1},"properties":{"sku":{"type":"string","_boost":1,"include_in_all":true,"index":"not_analyzed"},"name":{"type":"string","_boost":2,"include_in_all":true},"price":{"type":"float","_boost":1,"include_in_all":true,"index":"not_analyzed"},"description":{"type":"string","_boost":1,"include_in_all":true},"yesno":{"type":"string","_boost":1,"include_in_all":true,"index":"not_analyzed"},"size":{"type":"string","_boost":1,"include_in_all":true,"index":"not_analyzed"},"age":{"type":"string","_boost":1,"include_in_all":true,"index":"not_analyzed"},"colour":{"type":"string","_boost":1,"include_in_all":true,"index":"not_analyzed"}}}}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-1' -d '{"sku":"sku-1","name":"Alfa Romeo","price":1.99,"desctiption":"Alfa Romeo is an Italian manufacturer of cars. Founded as A.L.F.A. (Anonima Lombarda Fabbrica Automobili) on June 24, 1910, in Milan, [2] the company has been involved in car racing since 1911, and has a reputation for building expensive sports cars.[3] The company was owned by Italian state holding company Istituto per la Ricostruzione Industriale between 1932 and 1986, when it became a part of the Fiat Group,[4] and since February 2007 a part of Fiat Group Automobiles S.p.A.","yesno":"yes","size":"S","age":"baby","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-2' -d '{"sku":"sku-2","name":"Mercedes","price":2.99,"desctiption":"Mercedes is the pre-1927 brand name of German automobile models and engines built by Daimler company","yesno":"no","size":"L","age":"teenager","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-3' -d '{"sku":"sku-3","name":"Skoda","price":3.99,"desctiption":"Skoda is the automobile manufacturer in the Czech Republic (also the main article about \ufffdkoda vehicles)","yesno":"yes","size":"M","age":"adult","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-4' -d '{"sku":"sku-4","name":"Lada","price":4.99,"desctiption":"Lada is a trademark of the Russian car manufacturer AvtoVAZ based in Tolyatti, Samara Oblast. It was originally the export brand for the models it sold under the Zhiguli name in the domestic Soviet market since June 1970. All AvtoVAZ vehicles are currently sold under the Lada brand.","yesno":"no","size":"S","age":"retired","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-5' -d '{"sku":"sku-5","name":"Audi","price":5.99,"desctiption":"Audi and its subsidiaries design, engineer, manufacture and distribute automobiles and motorcycles under the Audi, Ducati and Lamborghini brands. Audi oversees worldwide operations from its headquarters in Ingolstadt, Bavaria, Germany. Audi-branded vehicles are produced in seven production facilities worldwide; Ducati and Lamborghini each have one production facility located in Italy.","yesno":"yes","size":"L","age":"baby","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-6' -d '{"sku":"sku-6","name":"Fiat","price":6.99,"desctiption":"Fiat S.p.A., (Fabbrica Italiana Automobili Torino)[4] (Italian Automobile Factory of Turin), is an Italian automobile manufacturer based in Turin. Fiat was founded in 1899 by a group of investors including Giovanni Agnelli. During its more than a century long history, Fiat has also manufactured railway engines and carriages, military vehicles, and aircraft. As of 2009, the Fiat group (not inclusive of its subsidiary Chrysler) was the worlds ninth largest carmaker and the largest in Italy.[5]","yesno":"no","size":"M","age":"teenager","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-7' -d '{"sku":"sku-7","name":"Test Product 0007","price":7.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"adult","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-8' -d '{"sku":"sku-8","name":"Test Product 0008","price":8.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"retired","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-9' -d '{"sku":"sku-9","name":"Test Product 0009","price":9.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"baby","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-10' -d '{"sku":"sku-10","name":"Test Product 0010","price":10.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"teenager","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-11' -d '{"sku":"sku-11","name":"Test Product 0011","price":11.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-12' -d '{"sku":"sku-12","name":"Test Product 0012","price":12.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"retired","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-13' -d '{"sku":"sku-13","name":"Test Product 0013","price":13.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"baby","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-14' -d '{"sku":"sku-14","name":"Test Product 0014","price":14.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"teenager","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-15' -d '{"sku":"sku-15","name":"Test Product 0015","price":15.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"adult","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-16' -d '{"sku":"sku-16","name":"Test Product 0016","price":16.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"retired","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-17' -d '{"sku":"sku-17","name":"Test Product 0017","price":17.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-18' -d '{"sku":"sku-18","name":"Test Product 0018","price":18.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"teenager","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-19' -d '{"sku":"sku-19","name":"Test Product 0019","price":19.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"adult","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-20' -d '{"sku":"sku-20","name":"Test Product 0020","price":20.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"retired","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-21' -d '{"sku":"sku-21","name":"Test Product 0021","price":21.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"baby","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-22' -d '{"sku":"sku-22","name":"Test Product 0022","price":22.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"teenager","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-23' -d '{"sku":"sku-23","name":"Test Product 0023","price":23.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-24' -d '{"sku":"sku-24","name":"Test Product 0024","price":24.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"retired","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-25' -d '{"sku":"sku-25","name":"Test Product 0025","price":25.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"baby","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-26' -d '{"sku":"sku-26","name":"Test Product 0026","price":26.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"teenager","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-27' -d '{"sku":"sku-27","name":"Test Product 0027","price":27.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"adult","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-28' -d '{"sku":"sku-28","name":"Test Product 0028","price":28.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"retired","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-29' -d '{"sku":"sku-29","name":"Test Product 0029","price":29.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-30' -d '{"sku":"sku-30","name":"Test Product 0030","price":30.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"teenager","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-31' -d '{"sku":"sku-31","name":"Test Product 0031","price":31.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"adult","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-32' -d '{"sku":"sku-32","name":"Test Product 0032","price":32.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"retired","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-33' -d '{"sku":"sku-33","name":"Test Product 0033","price":33.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"baby","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-34' -d '{"sku":"sku-34","name":"Test Product 0034","price":34.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"teenager","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-35' -d '{"sku":"sku-35","name":"Test Product 0035","price":35.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-36' -d '{"sku":"sku-36","name":"Test Product 0036","price":36.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"retired","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-37' -d '{"sku":"sku-37","name":"Test Product 0037","price":37.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"baby","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-38' -d '{"sku":"sku-38","name":"Test Product 0038","price":38.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"teenager","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-39' -d '{"sku":"sku-39","name":"Test Product 0039","price":39.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"adult","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-40' -d '{"sku":"sku-40","name":"Test Product 0040","price":40.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"retired","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-41' -d '{"sku":"sku-41","name":"Test Product 0041","price":41.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-42' -d '{"sku":"sku-42","name":"Test Product 0042","price":42.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"teenager","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-43' -d '{"sku":"sku-43","name":"Test Product 0043","price":43.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"adult","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-44' -d '{"sku":"sku-44","name":"Test Product 0044","price":44.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"retired","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-45' -d '{"sku":"sku-45","name":"Test Product 0045","price":45.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"baby","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-46' -d '{"sku":"sku-46","name":"Test Product 0046","price":46.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"teenager","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-47' -d '{"sku":"sku-47","name":"Test Product 0047","price":47.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-48' -d '{"sku":"sku-48","name":"Test Product 0048","price":48.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"retired","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-49' -d '{"sku":"sku-49","name":"Test Product 0049","price":49.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"baby","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-50' -d '{"sku":"sku-50","name":"Test Product 0050","price":50.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"teenager","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-51' -d '{"sku":"sku-51","name":"Test Product 0051","price":51.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"adult","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-52' -d '{"sku":"sku-52","name":"Test Product 0052","price":52.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"retired","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-53' -d '{"sku":"sku-53","name":"Test Product 0053","price":53.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-54' -d '{"sku":"sku-54","name":"Test Product 0054","price":54.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"teenager","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-55' -d '{"sku":"sku-55","name":"Test Product 0055","price":55.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"adult","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-56' -d '{"sku":"sku-56","name":"Test Product 0056","price":56.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"retired","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-57' -d '{"sku":"sku-57","name":"Test Product 0057","price":57.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"baby","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-58' -d '{"sku":"sku-58","name":"Test Product 0058","price":58.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"teenager","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-59' -d '{"sku":"sku-59","name":"Test Product 0059","price":59.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-60' -d '{"sku":"sku-60","name":"Test Product 0060","price":60.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"retired","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-61' -d '{"sku":"sku-61","name":"Test Product 0061","price":61.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"baby","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-62' -d '{"sku":"sku-62","name":"Test Product 0062","price":62.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"teenager","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-63' -d '{"sku":"sku-63","name":"Test Product 0063","price":63.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"adult","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-64' -d '{"sku":"sku-64","name":"Test Product 0064","price":64.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"retired","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-65' -d '{"sku":"sku-65","name":"Test Product 0065","price":65.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-66' -d '{"sku":"sku-66","name":"Test Product 0066","price":66.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"teenager","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-67' -d '{"sku":"sku-67","name":"Test Product 0067","price":67.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"adult","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-68' -d '{"sku":"sku-68","name":"Test Product 0068","price":68.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"retired","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-69' -d '{"sku":"sku-69","name":"Test Product 0069","price":69.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"baby","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-70' -d '{"sku":"sku-70","name":"Test Product 0070","price":70.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"teenager","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-71' -d '{"sku":"sku-71","name":"Test Product 0071","price":71.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-72' -d '{"sku":"sku-72","name":"Test Product 0072","price":72.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"retired","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-73' -d '{"sku":"sku-73","name":"Test Product 0073","price":73.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"baby","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-74' -d '{"sku":"sku-74","name":"Test Product 0074","price":74.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"teenager","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-75' -d '{"sku":"sku-75","name":"Test Product 0075","price":75.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"adult","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-76' -d '{"sku":"sku-76","name":"Test Product 0076","price":76.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"retired","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-77' -d '{"sku":"sku-77","name":"Test Product 0077","price":77.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-78' -d '{"sku":"sku-78","name":"Test Product 0078","price":78.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"teenager","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-79' -d '{"sku":"sku-79","name":"Test Product 0079","price":79.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"adult","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-80' -d '{"sku":"sku-80","name":"Test Product 0080","price":80.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"retired","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-81' -d '{"sku":"sku-81","name":"Test Product 0081","price":81.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"baby","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-82' -d '{"sku":"sku-82","name":"Test Product 0082","price":82.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"teenager","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-83' -d '{"sku":"sku-83","name":"Test Product 0083","price":83.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-84' -d '{"sku":"sku-84","name":"Test Product 0084","price":84.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"retired","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-85' -d '{"sku":"sku-85","name":"Test Product 0085","price":85.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"baby","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-86' -d '{"sku":"sku-86","name":"Test Product 0086","price":86.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"teenager","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-87' -d '{"sku":"sku-87","name":"Test Product 0087","price":87.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"adult","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-88' -d '{"sku":"sku-88","name":"Test Product 0088","price":88.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"retired","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-89' -d '{"sku":"sku-89","name":"Test Product 0089","price":89.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-90' -d '{"sku":"sku-90","name":"Test Product 0090","price":90.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"teenager","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-91' -d '{"sku":"sku-91","name":"Test Product 0091","price":91.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"adult","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-92' -d '{"sku":"sku-92","name":"Test Product 0092","price":92.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"retired","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-93' -d '{"sku":"sku-93","name":"Test Product 0093","price":93.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"baby","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-94' -d '{"sku":"sku-94","name":"Test Product 0094","price":94.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"teenager","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-95' -d '{"sku":"sku-95","name":"Test Product 0095","price":95.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"White"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-96' -d '{"sku":"sku-96","name":"Test Product 0096","price":96.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"M","age":"retired","colour":"Black"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-97' -d '{"sku":"sku-97","name":"Test Product 0097","price":97.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"S","age":"baby","colour":"Red"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-98' -d '{"sku":"sku-98","name":"Test Product 0098","price":98.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"L","age":"teenager","colour":"Yellow"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-99' -d '{"sku":"sku-99","name":"Test Product 0099","price":99.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"M","age":"adult","colour":"Green"}' | |
curl -XPUT 'http://localhost:9200/test_index/test_type/sku-100' -d '{"sku":"sku-100","name":"Test Product 0100","price":100.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"no","size":"S","age":"retired","colour":"White"}' | |
curl -XPOST 'http://localhost:9200/test_index/_refresh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"took" : 11, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 4, | |
"successful" : 4, | |
"failed" : 0 | |
}, | |
"hits" : { | |
"total" : 16, | |
"max_score" : 1.0, | |
"hits" : [ { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-29", | |
"_score" : 1.0, "_source" : {"sku":"sku-29","name":"Test Product 0029","price":29.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Green"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-47", | |
"_score" : 1.0, "_source" : {"sku":"sku-47","name":"Test Product 0047","price":47.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Red"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-65", | |
"_score" : 1.0, "_source" : {"sku":"sku-65","name":"Test Product 0065","price":65.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"White"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-83", | |
"_score" : 1.0, "_source" : {"sku":"sku-83","name":"Test Product 0083","price":83.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Yellow"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-17", | |
"_score" : 1.0, "_source" : {"sku":"sku-17","name":"Test Product 0017","price":17.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Red"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-35", | |
"_score" : 1.0, "_source" : {"sku":"sku-35","name":"Test Product 0035","price":35.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"White"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-53", | |
"_score" : 1.0, "_source" : {"sku":"sku-53","name":"Test Product 0053","price":53.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Yellow"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-71", | |
"_score" : 1.0, "_source" : {"sku":"sku-71","name":"Test Product 0071","price":71.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Black"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-5", | |
"_score" : 1.0, "_source" : {"sku":"sku-5","name":"Audi","price":5.99,"desctiption":"Audi and its subsidiaries design, engineer, manufacture and distribute automobiles and motorcycles under the Audi, Ducati and Lamborghini brands. Audi oversees worldwide operations from its headquarters in Ingolstadt, Bavaria, Germany. Audi-branded vehicles are produced in seven production facilities worldwide; Ducati and Lamborghini each have one production facility located in Italy.","yesno":"yes","size":"L","age":"baby","colour":"White"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-23", | |
"_score" : 1.0, "_source" : {"sku":"sku-23","name":"Test Product 0023","price":23.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Yellow"} | |
} ] | |
}, | |
"facets" : { | |
"_facet_yesno" : { | |
"_type" : "terms", | |
"missing" : 0, | |
"total" : 16, | |
"other" : 0, | |
"terms" : [ { | |
"term" : "no", | |
"count" : 17 | |
}, { | |
"term" : "yes", | |
"count" : 0 | |
} ] | |
}, | |
"_facet_size" : { | |
"_type" : "terms", | |
"missing" : 0, | |
"total" : 16, | |
"other" : 0, | |
"terms" : [ { | |
"term" : "M", | |
"count" : 16 | |
}, { | |
"term" : "S", | |
"count" : 17 | |
}, { | |
"term" : "L", | |
"count" : 0 | |
} ] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XGET 'http://localhost:9200/test_index/test_type/_search?pretty=true' -d '{ | |
"query":{ | |
"filtered":{ | |
"query":{ | |
"match_all":{} | |
}, | |
"filter":{ | |
"and":[ | |
{ | |
"or":[ | |
{ | |
"term":{"yesno":"yes"} | |
} | |
] | |
}, | |
{ | |
"or":[ | |
{ | |
"term":{"size":"L"} | |
} | |
] | |
} | |
] | |
} | |
} | |
}, | |
"facets":{ | |
"_facet_yesno":{ | |
"terms":{ | |
"field": | |
"yesno", | |
"order": | |
"reverse_count", | |
"all_terms":true | |
} | |
}, | |
"_facet_size":{ | |
"terms":{ | |
"field":"size", | |
"order":"reverse_count", | |
"all_terms":true | |
} | |
} | |
} | |
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"took" : 11, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 4, | |
"successful" : 4, | |
"failed" : 0 | |
}, | |
"hits" : { | |
"total" : 16, | |
"max_score" : 1.0, | |
"hits" : [ { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-29", | |
"_score" : 1.0, "_source" : {"sku":"sku-29","name":"Test Product 0029","price":29.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Green"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-47", | |
"_score" : 1.0, "_source" : {"sku":"sku-47","name":"Test Product 0047","price":47.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Red"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-65", | |
"_score" : 1.0, "_source" : {"sku":"sku-65","name":"Test Product 0065","price":65.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"White"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-83", | |
"_score" : 1.0, "_source" : {"sku":"sku-83","name":"Test Product 0083","price":83.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Yellow"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-17", | |
"_score" : 1.0, "_source" : {"sku":"sku-17","name":"Test Product 0017","price":17.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Red"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-35", | |
"_score" : 1.0, "_source" : {"sku":"sku-35","name":"Test Product 0035","price":35.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"White"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-53", | |
"_score" : 1.0, "_source" : {"sku":"sku-53","name":"Test Product 0053","price":53.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Yellow"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-71", | |
"_score" : 1.0, "_source" : {"sku":"sku-71","name":"Test Product 0071","price":71.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Black"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-5", | |
"_score" : 1.0, "_source" : {"sku":"sku-5","name":"Audi","price":5.99,"desctiption":"Audi and its subsidiaries design, engineer, manufacture and distribute automobiles and motorcycles under the Audi, Ducati and Lamborghini brands. Audi oversees worldwide operations from its headquarters in Ingolstadt, Bavaria, Germany. Audi-branded vehicles are produced in seven production facilities worldwide; Ducati and Lamborghini each have one production facility located in Italy.","yesno":"yes","size":"L","age":"baby","colour":"White"} | |
}, { | |
"_index" : "test_index", | |
"_type" : "test_type", | |
"_id" : "sku-23", | |
"_score" : 1.0, "_source" : {"sku":"sku-23","name":"Test Product 0023","price":23.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Yellow"} | |
} ] | |
}, | |
"facets" : { | |
"_facet_yesno" : { | |
"_type" : "terms", | |
"missing" : 0, | |
"total" : 16, | |
"other" : 0, | |
"terms" : [ { | |
"term" : "no", | |
"count" : 0 | |
}, { | |
"term" : "yes", | |
"count" : 16 | |
} ] | |
}, | |
"_facet_size" : { | |
"_type" : "terms", | |
"missing" : 0, | |
"total" : 16, | |
"other" : 0, | |
"terms" : [ { | |
"term" : "M", | |
"count" : 0 | |
}, { | |
"term" : "S", | |
"count" : 0 | |
}, { | |
"term" : "L", | |
"count" : 16 | |
} ] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to receive
{
"took" : 11,
"timed_out" : false,
"_shards" : {
"total" : 4,
"successful" : 4,
"failed" : 0
},
"hits" : {
"total" : 16,
"max_score" : 1.0,
"hits" : [ {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-29",
"_score" : 1.0, "_source" : {"sku":"sku-29","name":"Test Product 0029","price":29.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Green"}
}, {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-47",
"_score" : 1.0, "_source" : {"sku":"sku-47","name":"Test Product 0047","price":47.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Red"}
}, {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-65",
"_score" : 1.0, "_source" : {"sku":"sku-65","name":"Test Product 0065","price":65.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"White"}
}, {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-83",
"_score" : 1.0, "_source" : {"sku":"sku-83","name":"Test Product 0083","price":83.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Yellow"}
}, {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-17",
"_score" : 1.0, "_source" : {"sku":"sku-17","name":"Test Product 0017","price":17.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Red"}
}, {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-35",
"_score" : 1.0, "_source" : {"sku":"sku-35","name":"Test Product 0035","price":35.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"White"}
}, {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-53",
"_score" : 1.0, "_source" : {"sku":"sku-53","name":"Test Product 0053","price":53.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"baby","colour":"Yellow"}
}, {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-71",
"_score" : 1.0, "_source" : {"sku":"sku-71","name":"Test Product 0071","price":71.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Black"}
}, {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-5",
"_score" : 1.0, "_source" : {"sku":"sku-5","name":"Audi","price":5.99,"desctiption":"Audi and its subsidiaries design, engineer, manufacture and distribute automobiles and motorcycles under the Audi, Ducati and Lamborghini brands. Audi oversees worldwide operations from its headquarters in Ingolstadt, Bavaria, Germany. Audi-branded vehicles are produced in seven production facilities worldwide; Ducati and Lamborghini each have one production facility located in Italy.","yesno":"yes","size":"L","age":"baby","colour":"White"}
}, {
"_index" : "test_index",
"_type" : "test_type",
"_id" : "sku-23",
"_score" : 1.0, "_source" : {"sku":"sku-23","name":"Test Product 0023","price":23.99,"desctiption":"Lorem Ipsum shitty nitt pit.","yesno":"yes","size":"L","age":"adult","colour":"Yellow"}
} ]
},
"facets" : {
"_facet_yesno" : {
"_type" : "terms",
"missing" : 0,
"total" : 16,
"other" : 0,
"terms" : [ {
"term" : "no",
"count" : 17
}, {
"term" : "yes",
"count" : 0
} ]
},
"_facet_size" : {
"_type" : "terms",
"missing" : 0,
"total" : 16,
"other" : 0,
"terms" : [ {
"term" : "M",
"count" : 16
}, {
"term" : "S",
"count" : 17
}, {
"term" : "L",
"count" : 0
} ]
}
}
}