# Zero result?

**URL:** <https://discuss.elastic.co/t/zero-result/133014>\
**Category:** Elasticsearch\
**Created:** [May 23, 2018, 3:02pm UTC](https://discuss.elastic.co/t/zero-result/133014 "2018-05-23T15:02:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![remco\_zwaan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/remco_zwaan/32/129991_2.png) [@remco\_zwaan](https://discuss.elastic.co/u/remco_zwaan)\
**Post date:** [May 23, 2018, 3:02pm UTC](https://discuss.elastic.co/t/zero-result/133014/1 "2018-05-23T15:02:32Z")

</div>

Hi ,

**This is my mapping:**

```
    {
      "lodgings_development_20180523154411698": {
        "mappings": {
          "lodging": {
            "_all": {
              "enabled": false
            },
            "dynamic_templates": [
              {
                "string_template": {
                  "match": "*",
                  "match_mapping_type": "string",
                  "mapping": {
                    "fields": {
                      "analyzed": {
                        "analyzer": "searchkick_index",
                        "index": true,
                        "type": "text"
                      }
                    },
                    "ignore_above": 30000,
                    "type": "keyword"
                  }
                }
              }
            ],
            "properties": {
              "adults": {
                "type": "long"
              },
              "availability_adults": {
                "type": "long"
              },
              "availability_children": {
                "type": "long"
              },
              "availability_infants": {
                "type": "long"
              },
              "availability_price": {
                "type": "float"
              },
              "available_on": {
                "type": "date"
              },
              "baths": {
                "type": "long"
              },
              "beds": {
                "type": "long"
              },
              "children": {
                "type": "long"
              },
              "city": {
                "type": "keyword",
                "fields": {
                  "analyzed": {
                    "type": "text",
                    "analyzer": "searchkick_index"
                  },
                  "text_start": {
                    "type": "text",
                    "analyzer": "searchkick_text_start_index"
                  }
                },
                "ignore_above": 30000
              },
              "created_at": {
                "type": "date"
              },
              "id": {
                "type": "long"
              },
              "infants": {
                "type": "long"
              },
              "latitude": {
                "type": "float"
              },
              "location": {
                "type": "geo_point"
              },
              "lodging_type": {
                "type": "keyword",
                "fields": {
                  "analyzed": {
                    "type": "text",
                    "analyzer": "searchkick_index"
                  }
                },
                "ignore_above": 30000
              },
              "longitude": {
                "type": "float"
              },
              "price": {
                "type": "long"
              },
              "sale_date": {
                "type": "date"
              },
              "sq__ft": {
                "type": "float"
              },
              "state": {
                "type": "keyword",
                "fields": {
                  "analyzed": {
                    "type": "text",
                    "analyzer": "searchkick_index"
                  }
                },
                "ignore_above": 30000
              },
              "street": {
                "type": "keyword",
                "fields": {
                  "analyzed": {
                    "type": "text",
                    "analyzer": "searchkick_index"
                  }
                },
                "ignore_above": 30000
              },
              "updated_at": {
                "type": "date"
              },
              "zip": {
                "type": "keyword",
                "fields": {
                  "analyzed": {
                    "type": "text",
                    "analyzer": "searchkick_index"
                  }
                },
                "ignore_above": 30000
              }
            }
          }
        }
      }
    }

**Then this is my query** 
    GET /lodgings_development/_search
            {
              "query": {
                "bool": {
                  "must": {
                    "match_all": {}
                  },
                  "filter": [
                    {
                      "terms": {
                        "available_on": [
                          "2018-06-06",
                          "2018-06-07",
                          "2018-06-08"
                        ]
                      }
                    },
                    {
                      "term": {
                        "adults": "1"
                      }
                    },
                    {
                      "term": {
                        "children": "0"
                      }
                    },
                    {
                      "term": {
                        "infants": "0"
                      }
                    },
                    {
                      "term": {
                        "lodging_id": 14
                      }
                    }
                  ]
                }
              },
              "timeout": "11s",
              "_source": false,
              "size": 10000,
              "from": 0
            }

```

GET zero results! Is my query not ok??

---

<div class="post-metadata">

**Author:** ![RahulD](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RahulD](https://discuss.elastic.co/u/RahulD)\
**Post date:** [May 23, 2018, 3:51pm UTC](https://discuss.elastic.co/t/zero-result/133014/2 "2018-05-23T15:51:37Z")

</div>

There is no lodging\_id defined in the mappings and you are filtering on it...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 20, 2018, 4:04pm UTC](https://discuss.elastic.co/t/zero-result/133014/3 "2018-06-20T16:04:37Z")

</div>

Closed on June 20, 2018, 4:04pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
