# Trying to understand the data in Array or with Nested Objects

**URL:** <https://discuss.elastic.co/t/trying-to-understand-the-data-in-array-or-with-nested-objects/99883>\
**Category:** Elasticsearch\
**Created:** [September 8, 2017, 6:12pm UTC](https://discuss.elastic.co/t/trying-to-understand-the-data-in-array-or-with-nested-objects/99883 "2017-09-08T18:12:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abkrim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abkrim/32/20217_2.png) [@abkrim](https://discuss.elastic.co/u/abkrim)\
**Post date:** [September 8, 2017, 6:12pm UTC](https://discuss.elastic.co/t/trying-to-understand-the-data-in-array-or-with-nested-objects/99883/1 "2017-09-08T18:12:44Z")

</div>

For searches I search in, for example, the fields field2 and field3, but I need to score with the field3 of the first group. For example, sequence 1 has more value than sequence 2, and is more than 3 if it exists. There are not always 2.3 or more sequences. Sometimes there is only one,

Should I create an index with the first\_group, and delete those data from the first index documents? Or is it possible to work with this type of data in a single index?

Maybe my level of English does not allow me to advance in what I want to say.

```
{
	"field1" : "sometext",
	"field2" : "sometext",
	...
	"first_group" : [
		{
			"sequence" : 1, // Integer autoincrement
			"field2" : "sometext",
			"field3" : "sometext",
			"date" : "20170120" // Format YYYYMMDD not mapping. ES put type text 
		},
		{
			"sequence" : 2, // Integer autoincrement
			"field2" : "sometext2",
			"field3" : "sometext2",
			"date" : "20170121" // Format YYYYMMDD not mapping. ES put type text 
		},
		...
		
	],
	"other_group" : [
		{
			// Similar 
		}
	]
	"other_group2" : [
		{
			// Similar 
		}
	]
}
```

---

<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:** [October 6, 2017, 6:13pm UTC](https://discuss.elastic.co/t/trying-to-understand-the-data-in-array-or-with-nested-objects/99883/2 "2017-10-06T18:13:14Z")

</div>

Closed on October 6, 2017, 6:13pm UTC

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