I'm running a cluster with 4 nodes, all with identical server specs and ES 
versions (1.1.0)

I keep running into this problem when running this query:

{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "name": "general"
          }
        },
        {
          "term": {
            "property": "10048924"
          }
        }
      ]
    }
  },
  "aggs": {
    "newsletter_count": {
      "date_histogram": {
        "field": "dt",
        "interval": "day"
      },
      "aggs": {
        "total": {
          "sum": {
            "field": "value"
          }
        }
      }
    }
  }
}

Whenever I run it, I get an error on 2 shards:


   - _shards: {
      - total: 8
      - successful: 6
      - failed: 2
      - failures: [
         - {
            - index: ga
            - shard: 3
            - status: 500
            - reason: RemoteTransportException[[Jane 
            Foster][inet[/188.226.213.227:9300]][search/phase/query]]; nested: 
            
ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData
 
            cannot be cast to 
org.elasticsearch.index.fielddata.IndexNumericFieldData]; 
         }
         - {
            - index: ga
            - shard: 7
            - status: 500
            - reason: RemoteTransportException[[Jane 
            Foster][inet[/188.226.213.227:9300]][search/phase/query]]; nested: 
            
ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData
 
            cannot be cast to 
org.elasticsearch.index.fielddata.IndexNumericFieldData]; 
         }
      ]
   }


When I destroy the index and recreate it, the same error keeps occuring but 
it will be on another node.  I'm using a template for the index:

{
    "template": "ga",
    "settings": {
        "index.number_of_shards" : 8,
        "index.number_of_replicas" : 0,
        "index.routing.allocation.total_shards_per_node" : 2,
        "index.auto_expand_replicas": false
    }
    ,
    "mappings": {
        "_default_": {
            "_source": { "compress": true }
        },
        "articles": {
            "properties": {
                "property": {"type":"integer", "index": "not_analyzed"},
                "dt": {"type": "date", "index": "not_analyzed"},
                "value": {"type": "integer", "index": "not_analyzed"},
                "name": {"type": "string", "index":"not_analyzed"}
            }}
    }
}

Any ideas on what I'm doing wrong or how I can resolve this issue?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/13528eaa-9f0d-4514-a6e3-e4babc952a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to