# How to store huge amount of complex data?

**URL:** <https://discuss.elastic.co/t/how-to-store-huge-amount-of-complex-data/123521>\
**Category:** Elasticsearch\
**Created:** [March 12, 2018, 10:03am UTC](https://discuss.elastic.co/t/how-to-store-huge-amount-of-complex-data/123521 "2018-03-12T10:03:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![boeledi01](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@boeledi01](https://discuss.elastic.co/u/boeledi01)\
**Post date:** [March 12, 2018, 10:03am UTC](https://discuss.elastic.co/t/how-to-store-huge-amount-of-complex-data/123521/1 "2018-03-12T10:03:49Z")

</div>

Hi,

I need to figure out the best way of storing the information and I would appreciate your advice.

I am receiving 250,000,000 messages.  
Each message contains:

- up to 7 traders
- up to 999 good items
- other data (but I simplify here)

Each trader has

- Identification number
- Name
- address
- Type

Each good item has:

- reference
- description
- mass
- ...

My users need to be able to look for traders, good items, ...

Basic example of query could be:

- list of traders involved in messages where good items type is ... and mass \> ... and message issued by ... between date 1 and date 2 , and trader address "sound like" ..., group by trader type and location

In fact, users will be able to tackle the information from all directions (messages, traders, goods).

Therefore I thought storing the information the following way: =\> good items oriented

Per good item, I create a document that replicates all "searchable" information related to:

- the good item itself
- all the traders info
- the other searchable info from the message

The advantage of this solution would be to flattenize the data.  
The drawback is the replication of the information.

That's why I would appreciate your expertise...

Many thanks in advance,

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 12, 2018, 10:29am UTC](https://discuss.elastic.co/t/how-to-store-huge-amount-of-complex-data/123521/2 "2018-03-12T10:29:18Z")

</div>

Interesting. That's a similar project to what my former colleagues and I did at the french customs with elasticsearch. 😉

> The advantage of this solution would be to flattenize the data.  
> The drawback is the replication of the information.

Yes. We came to the same conclusion. So we indexed the same data multiple times. I think it's a good tradeoff.

---

<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:** [April 9, 2018, 10:30am UTC](https://discuss.elastic.co/t/how-to-store-huge-amount-of-complex-data/123521/3 "2018-04-09T10:30:03Z")

</div>

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