# Indexing structured & unstructured random data

**URL:** <https://discuss.elastic.co/t/indexing-structured-unstructured-random-data/94145>\
**Category:** Elasticsearch\
**Created:** [July 21, 2017, 6:35pm UTC](https://discuss.elastic.co/t/indexing-structured-unstructured-random-data/94145 "2017-07-21T18:35:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dataminer](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@dataminer](https://discuss.elastic.co/u/dataminer)\
**Post date:** [July 21, 2017, 6:35pm UTC](https://discuss.elastic.co/t/indexing-structured-unstructured-random-data/94145/1 "2017-07-21T18:35:39Z")

</div>

Okay, hopefully I explain this properly as I have been trying to sort this in my head for the last few hours.

I have an index that will gather in random data, from plain text, to numbers to json objects.  
I am trying to index into two fields: meta and content

"meta" will be a json object that contains record\_date, tags, category and source. That bit is fine and it works.  
The problem is when I get a json object to put into the "content" field - the objects are never the same so I cannot just query on content.json\_key.

What I was thinking was is it possible to take the json object and just make it a plain string thats easy to search on.

Apologies if this doesn't make sense.........my brain is dripping out of my nose after trying to solve this!

Thanks

---

<div class="post-metadata">

**Author:** ![dataminer](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@dataminer](https://discuss.elastic.co/u/dataminer)\
**Post date:** [July 22, 2017, 4:26pm UTC](https://discuss.elastic.co/t/indexing-structured-unstructured-random-data/94145/2 "2017-07-22T16:26:53Z")

</div>

Okay - must of been a long day yesterday, managed to sort it today by using query\_string with wildcard field along the lines of:

"query\_string": {  
"fields": ["fieldname.\*"]

---

<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:** [August 19, 2017, 4:26pm UTC](https://discuss.elastic.co/t/indexing-structured-unstructured-random-data/94145/3 "2017-08-19T16:26:54Z")

</div>

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