Skip to content

Instantly share code, notes, and snippets.

@sandys
Created July 27, 2012 05:05
Show Gist options
  • Save sandys/3186259 to your computer and use it in GitHub Desktop.
Save sandys/3186259 to your computer and use it in GitHub Desktop.
Elasticsearch schema properties
Products
* id : integer
* name : string
* date : date
* price : float
* items_available : integer
I created the index "testindex" using the mapping API, here is what I
find in the logs :
Put mapping [product] with source [{
"product" : {
"type" : "object",
"dynamic" : true,
"enabled" : true,
"pathType" : "full",
"dateFormats" : [ "dateOptionalTime" ],
"boostField" : {
"name" : "_boost"
},
"properties" : {
"id" : {
"type" : "integer",
"indexName" : "id",
"index" : "not_analyzed",
"store" : "yes",
"termVector" : "no",
"boost" : 1.0,
"omitNorms" : true,
"omitTermFreqAndPositions" : true,
"precisionStep" : 4
},
"price" : {
"type" : "float",
"indexName" : "price",
"index" : "not_analyzed",
"store" : "yes",
"termVector" : "no",
"boost" : 1.0,
"omitNorms" : true,
"omitTermFreqAndPositions" : true,
"precisionStep" : 4
},
"items_available" : {
"type" : "integer",
"indexName" : "items_available",
"index" : "not_analyzed",
"store" : "yes",
"termVector" : "no",
"boost" : 1.0,
"omitNorms" : true,
"omitTermFreqAndPositions" : true,
"precisionStep" : 4
},
"name" : {
"type" : "string",
"indexName" : "name",
"index" : "analyzed",
"store" : "yes",
"termVector" : "no",
"boost" : 1.0,
"omitNorms" : false,
"omitTermFreqAndPositions" : false
},
"date" : {
"type" : "date",
"indexName" : "date",
"index" : "not_analyzed",
"store" : "yes",
"termVector" : "no",
"boost" : 1.0,
"omitNorms" : true,
"omitTermFreqAndPositions" : true,
"precisionStep" : 4,
"format" : "YYYY-MM-dd"
}
}
}
}]
http://www.lucidimagination.com/content/scaling-lucene-and-solr#d0e71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment