Hi,

I have difficulty with copy_to and nested field. I'm trying to copy some field value from original document to nested document, and as I can see from stored_fields, it has been copied successfully. The problem appears when I try to query that "copied_to" field - it returns zero results although I know there are lots of documents that match the query. Does anybody know what am I missing?

Here is my mapping:
{
     "mappings": {
          "property": {
                "properties": {
                   "bedrooms": {
                     "type": "byte",
                      "copy_to": "discount.bedrooms"
                  },
                  "discount": {
                     "type": "nested",
                     "properties": {
                              "value": {"type": "integer"},
                              "bedrooms": {"type": "byte"}
                      }
                 }
               }
            }
    }
}

GET /_search
{
  "query": {
    "nested": {
      "path": "discount",
      "query": {
        "term": {
          "discount.bedrooms": 5
        }
      }
    }
  }
}
---
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB