PUT /firstindex { "mappings": { "properties": { "username": { "type": "text" }, "age": { "type": "integer" } } } } // Creating an index with username field and age field // DataTypes in elasticsearch: // text: متن // keyword: متنی که یک کلمه خاص است، مانند آی دی با حروف یا پسورد // integer: اعداد عادی و اعشاری // date: زمان(فرمت های مختلف مثلا ISO8601) // boolean: True and False // object: ذخیره یک آبجکت با زبان های شی گرا