# Can have empty properties mapping?

**URL:** <https://discuss.elastic.co/t/can-have-empty-properties-mapping/70288>\
**Category:** Elasticsearch\
**Created:** [December 30, 2016, 5:31pm UTC](https://discuss.elastic.co/t/can-have-empty-properties-mapping/70288 "2016-12-30T17:31:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxwell\_Flanders](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@Maxwell\_Flanders](https://discuss.elastic.co/u/Maxwell_Flanders)\
**Post date:** [December 30, 2016, 5:31pm UTC](https://discuss.elastic.co/t/can-have-empty-properties-mapping/70288/1 "2016-12-30T17:31:02Z")

</div>

I only want to pre-define a field as an object datatype, but i do not know what fields will go in it, they will be added later by various bits of a logstash kv filter. Can i define it like so without errors??

```
"my-field": {
  "properties": {
          
  }
}

```

So, an empty properties field, but "my-field" is definitely an object.

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [December 30, 2016, 6:21pm UTC](https://discuss.elastic.co/t/can-have-empty-properties-mapping/70288/2 "2016-12-30T18:21:06Z")

</div>

Yes, that should work. Alternatively, you also specify the type as object explicitly:

```auto
"my-field": {
  "type": "object"
}

```

---

<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:** [January 27, 2017, 6:21pm UTC](https://discuss.elastic.co/t/can-have-empty-properties-mapping/70288/3 "2017-01-27T18:21:17Z")

</div>

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