Error on 2 shards only

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 elasticsearch+unsubscribe@googlegroups.com.
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.

Check your effective mappings. Although you declared type "date" on dt, it
might contain actually some strings or non-parseable date strings?

Jörg

On Mon, May 5, 2014 at 2:40 PM, Jan van Vlimmeren <
jan.vanvlimmeren@gmail.com> wrote:

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/13528eaa-9f0d-4514-a6e3-e4babc952a7c%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/13528eaa-9f0d-4514-a6e3-e4babc952a7c%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/CAKdsXoEe2-7fiUXTX11ZH_E-3rzWN7k%2BPvbyTBh_Nc%2BwZo1tVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

That was it, many thanks.

Strange only 2 shards fail and the output seemed correct except for the
data on those shards.

On Monday, May 5, 2014 3:28:02 PM UTC+2, Jörg Prante wrote:

Check your effective mappings. Although you declared type "date" on dt, it
might contain actually some strings or non-parseable date strings?

Jörg

On Mon, May 5, 2014 at 2:40 PM, Jan van Vlimmeren <jan.vanv...@gmail.com<javascript:>

wrote:

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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/13528eaa-9f0d-4514-a6e3-e4babc952a7c%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/13528eaa-9f0d-4514-a6e3-e4babc952a7c%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/a1bdeef7-26b2-453e-b649-787ad3609b12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.