Hi All,
I have a problem in creating index templates which seems not working for me I couldn't find where I made mistake.
I created a sample index template with settings & new mapping as like as follows.. After that I created item_index and indexed values and during index creation does not set the precision_step & doc value attribute as per the item_index_template in the mappings. Does doc_value & precision_step attribute needs to be set in different manner while using templates?
PUT /_template/item_index_template
{
"template": "item*",
"settings": {
"number_of_shards": 20
},
"mappings": {
"ICV": {
"properties": {
"C37": {
"type": "long",
"precision_step": 2147483647,
"doc_values": true
} } } } }
Sample Item_index
POST itemtest/item/3214438
{
"ITEM_ID": 3214438,
"ITEM_CODE": "9588049",
"ITEM_DSCR": "HOME FURNISHINGS & DECOR",
"ITEM_SPECIFICITY_REF_ID": 186,
"ITEM_TYPE": "SGI",
"HAS_HIST_IND": "Y",
"MOD_CHR_VAL_ID": 18136791,
"MOD_DSCR": "HOME FURNISHINGS & DECOR",
"DIST": [
{
"RGN_ID": 5,
"RGN_NM": "AT",
"RGN_DESC": "TEST ITEM",
"DSTN_STRT_DT": "2011-03-03 21:33:51",
"IS_FFU_IND": "Y",
"FIRST_FFU_DT": "2012-07-06 16:17:18",
"HAS_LPV_IND": "N",
},
],
"ICV": { "C37": 18136791 }
}
The number of shard which I given in index_template are reflected in settings of index itemtest.
Sample output of itemtest settings
"itemtest": {
"settings": {
"index": {
"creation_date": "1453962000588",
"number_of_shards": "20",
"analysis": {
"filter": {
"substring": {
"type": "nGram",
"min_gram": "2",
"max_gram": "20"
},
sample output of itemtest mapping
"HAS_IMAGE_IND": {
"type": "string",
"index": "not_analyzed",
"doc_values": true
},
"ICV": { "properties": {"C37": {"type": "long"}}},
"IS_SHARED_IND": {
"type": "string",
"index": "not_analyzed",
"doc_values": true
},
Please let us know your suggestions.
Thanks,
Ganeshbabu R