You need to create an Elasticsearch index named profiles with 1 shard and 1 replica. The index should have fields: username (keyword), age (integer), and bio (text). Which JSON correctly defines this index?
A { "settings": { "number_of_shards": 1, "number_of_replicas": 1 }, "mappings": { "properties": { "username": { "type": "keyword" }, "age": { "type": "integer" }, "bio": { "type": "text" } } } }
B { "settings": { "shards": 1, "replicas": 1 }, "mappings": { "fields": { "username": "keyword", "age": "integer", "bio": "text" } } }
C { "settings": { "number_of_shards": "one", "number_of_replicas": "one" }, "mappings": { "properties": { "username": { "type": "keyword" }, "age": { "type": "integer" }, "bio": { "type": "text" } } } }
D { "settings": { "number_of_shards": 1 }, "mapping": { "properties": { "username": { "type": "keyword" }, "age": { "type": "integer" }, "bio": { "type": "text" } } } }
Check Answer