Hi,
I'm trying to create a mapping for a nested document and I realize that i
cannot set the index type of a string field to analyzed:
{
"action": {
"_all": {
"enabled": false
},
"_type": {
"index": "no"
},
"_timestamp": {
"enabled": true,
"store": "yes"
},
"_routing": {
"required": true,
"path": "userId"
},
"properties": {
"userId": {
"type": "string",
"index": "not_analyzed"
},
"extra": {
"type": "nested",
"properties": {
"key": {
"type": "string",
"index": "not_analyzed"
},
"value": {
- "type": "string",*
- "index": "analyzed"*
- }*
}
}
}
}
}
The above ends up with the following result when calling for the mapping
(curl -XGET localhost:9200/my_index/action/_mapping?pretty ):
{
"action": {
"_all": {
"enabled": false
},
"_type": {
"index": "no"
},
"_timestamp": {
"enabled": true,
"store": "yes"
},
"_routing": {
"required": true,
"path": "userId"
},
"properties": {
"userId": {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"extra": {
"type": "nested",
"properties": {
"key": {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"value": {
- "type": "string"*
- }*
}
}
}
}
}
Should it display index type as analyzed? furthermore I cannot search based
on this field? Should I search by defining the analyzer?
ES version 0.90.7 but i noticed this since version 0.90.2, probably I'm
doing something wrong here.
Looking forward for your reply
Thank you
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/01ec164d-bb31-4e5b-87d2-1a9abadb0b69%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.