Created
January 12, 2018 16:09
-
-
Save danielef/8f2d0744471ec8cf93c205fa6f7443e2 to your computer and use it in GitHub Desktop.
#Elasticsearch / Create an index with mapping
This file contains hidden or 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 -XPUT -H "Content-Type: application/json" http://localhost:9200/my-index -d ' | |
{ | |
"mappings": { | |
"user": { | |
"properties": { | |
"name": { "type": "text" }, | |
"user_name": { "type": "keyword" }, | |
"email": { "type": "keyword" } | |
} | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment