# Separating large immutable field vs mutable fields

**URL:** https://discuss.elastic.co/t/separating-large-immutable-field-vs-mutable-fields/27074
**Category:** Elasticsearch
**Created:** [August 8, 2015, 5:30am UTC](https://discuss.elastic.co/t/separating-large-immutable-field-vs-mutable-fields/27074 "2015-08-08T05:30:49Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![bvnagaraju](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bvnagaraju](https://discuss.elastic.co/u/bvnagaraju)
#### Post date: [August 8, 2015, 5:30am UTC](https://discuss.elastic.co/t/separating-large-immutable-field-vs-mutable-fields/27074/1 "2015-08-08T05:30:49Z")

</div>

Hi,

I have a scenario where my document has one large field (content /text) field which is updated very rarely(0.1%) and all others are very small fields which are updates very often(99.9%)

What is found in performance test is that if text field is not indexed then updates are super fast .

But text field is must to do free word searches

I understand why updates are super fast with out text field as elastic has to deal with very small payload to delete and insert that happens during update

so am thinking I want to divide my document in to two parts document content with only text/content field and document fields with all other fields so that my 99% cases of updates I can deal with document fields at faster rate compare to having document with text and all fields

how do I separate this two document content and document fields ?

which option I should use ? document types /multiple indexes /parent-child ?

Also please note that all sortables fields in document fields part

document content /text is analyzed field to do full text searches

Any directions on this will be help full

Regards,  
Nagaraju

---

<div class="post-metadata">

### Author: ![bvnagaraju](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bvnagaraju](https://discuss.elastic.co/u/bvnagaraju)
#### Post date: [August 8, 2015, 6:24am UTC](https://discuss.elastic.co/t/separating-large-immutable-field-vs-mutable-fields/27074/2 "2015-08-08T06:24:05Z")

</div>

I understand that we can same document id in both document content and document fields

How do I sort on same document fields documents if the search matches on document content

For example :doc ids 1,2,3 are qualified for a search from document .now I want to sort document id 1,2,3 from document fields by using field form document field

---

<div class="post-metadata">

### Author: ![bvnagaraju](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bvnagaraju](https://discuss.elastic.co/u/bvnagaraju)
#### Post date: [August 9, 2015, 2:16am UTC](https://discuss.elastic.co/t/separating-large-immutable-field-vs-mutable-fields/27074/3 "2015-08-09T02:16:26Z")

</div>

can some one let me know thoughts

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [August 10, 2015, 3:16am UTC](https://discuss.elastic.co/t/separating-large-immutable-field-vs-mutable-fields/27074/4 "2015-08-10T03:16:23Z")

</div>

Probably parent child, or different indices if you are ok to do an external join/multiple queries.

---

<div class="post-metadata">

### Author: ![bvnagaraju](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bvnagaraju](https://discuss.elastic.co/u/bvnagaraju)
#### Post date: [August 10, 2015, 3:42am UTC](https://discuss.elastic.co/t/separating-large-immutable-field-vs-mutable-fields/27074/5 "2015-08-10T03:42:23Z")

</div>

Thanks Mark

how do I achieve sorting behavior if if separate large content/text field in document type and all other fields in another document type which has all sortable fields

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [August 10, 2015, 3:47am UTC](https://discuss.elastic.co/t/separating-large-immutable-field-vs-mutable-fields/27074/6 "2015-08-10T03:47:13Z")

</div>

External to ES, ie in your app.

This is the price of dealing in NoSQL platforms unfortunately; Relationships are hard(er)!

---

<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: [July 5, 2017, 11:56pm UTC](https://discuss.elastic.co/t/separating-large-immutable-field-vs-mutable-fields/27074/7 "2017-07-05T23:56:39Z")

</div>


