↓ Skip to main content

Tutorial

Tutorial on Elastic

·1677 words·8 mins
Running elastic # (see Elastic search and Kibana - getting started) Use case: building a employee directory for Megacorp each document - type of ’employee' everything in megacorp index Populating # # Delete the `megacorp` index in case it already exists DELETE /megacorp # Index document 1, type "employee", in the # "megacorp" index PUT /megacorp/employee/1 { "first_name" : "John", "last_name" : "Smith", "age" : 25, "about" : "I love to go rock climbing", "interests": [ "sports", "music" ] } # Index two more documents PUT /megacorp/employee/2 { "first_name" : "Jane", "last_name" : "Smith", "age" : 32, "about" : "I like to collect rock albums", "interests": [ "music" ] } PUT /megacorp/employee/3 { "first_name" : "Douglas", "last_name" : "Fir", "age" : 35, "about": "I like to build cabinets", "interests": [ "forestry" ] } In server