Basically two forms:
1. creating index while creating mapping
curl -XPUT localhost:9200/testIndex -d'
{
"mappings":{
"testType": {
"properties": {
"id": {
"type": "string"
},
"xml": {
"type" : "string", "index" : "no" , "include_in_all":"false"
},
"json": {
"type": "nested"
},
"comment": {
"type": "string"
}
}
}
}
}'
2. creating or updating mapping in existing index
curl -XPUT localhost:9200/testIndex/_mapping/testType2 -d'
{
"properties": {
"id": {
"type": "string"
},
"xml": {
"type" : "string", "index" : "no" , "include_in_all":"false"
},
"json": {
"type": "nested"
},
"comment": {
"type": "string"
}
}
}'
Quick tips or notes that probably reflects 20 percent of knowledge that usually does 80 percent of job.
Showing posts with label Index. Show all posts
Showing posts with label Index. Show all posts
Monday, April 11, 2016
Monday, November 12, 2012
Left most index key
It should be most selective(more distinct values) because this reduces the number of database pages that must be read by the database engine while traversing the index, in order to satisfy the query.
Keep in mind that SQL Server's index has an entry for each of the row in underlying table, no matter they are unique or duplicate.
Keep in mind that SQL Server's index has an entry for each of the row in underlying table, no matter they are unique or duplicate.
Subscribe to:
Posts (Atom)