No hits returned?

Using Elasticsearch 5.x.

In Postman I get the behaviour I except, ie GET /indexname/_search with a match-all query returns:

{
    "took": 20,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": 4,
        "max_score": 1,
        "hits": [
            {
                "_index": "order_statistics",
                "_type": "order",
                "_id": "AWEjJ3rUS-BD1AqGGMUE",
                "_score": 1,
                "_source": {
                    "id": 109679750,
                    "created": 1516613942,
                    "webshop_id": 22222,
                    "category": "Barnprodukter",
                    "total_basket_incvat_original_currency": 200,
                    "total_basket_excvat_original_currency": 160,
                    "total_basket_incvat_sek": 200,
                    "total_basket_excvat_sek": 160,
                    "total_freight_incvat_original_currency": 7,
                    "total_freight_excvat_original_currency": 7,
                    "total_freight_incvat_sek": 7,
                    "total_freight_excvat_sek": 7,
                    "order_currency": "SEK",
                    "order_language": "sv",
                    "payoption": "custom",
                    "delivery_country": "SE",
                    "delivery_method": "Avhämtning",
                    "theme": "",
                    "buyer_org_type": "person"
                }
            },
            {
                "_index": "order_statistics",
                "_type": "order",
                "_id": "AWEjKAlcS-BD1AqGGMUF",
                "_score": 1,
                "_source": {
                    "id": 109679750,
                    "created": 1516613942,
                    "webshop_id": 22222,
                    "category": "Barnprodukter",
                    "total_basket_incvat_original_currency": 200,
                    "total_basket_excvat_original_currency": 160,
                    "total_basket_incvat_sek": 200,
                    "total_basket_excvat_sek": 160,
                    "total_freight_incvat_original_currency": 7,
                    "total_freight_excvat_original_currency": 7,
                    "total_freight_incvat_sek": 7,
                    "total_freight_excvat_sek": 7,
                    "order_currency": "SEK",
                    "order_language": "sv",
                    "payoption": "custom",
                    "delivery_country": "SE",
                    "delivery_method": "Avhämtning",
                    "theme": "",
                    "buyer_org_type": "person"
                }
            },
            {
                "_index": "order_statistics",
                "_type": "mappings",
                "_id": "AWEjSoU_S-BD1AqGGMUH",
                "_score": 1,
                "_source": {
                    "query": {
                        "match_all": {}
                    }
                }
            },
            {
                "_index": "order_statistics",
                "_type": "mapping",
                "_id": "AWEjSqCSS-BD1AqGGMUI",
                "_score": 1,
                "_source": {
                    "query": {
                        "match_all": {}
                    }
                }
            }
        ]
    }
}

But setting up anything i Grafana just gives me zero hits:


I must be doing something wrong, but reading docus, here and googling hasn’t really gotten me anywhere yet.

Doh. After much digging, it turns out it was probably the fact that I was using epoch_millis but actually populating with epoch_seconds, so the aggregated min/max was out of bounds.

1 Like