# Extracting specific fields from long documents and moving them to a structured DB for analysis

**URL:** <https://discuss.elastic.co/t/extracting-specific-fields-from-long-documents-and-moving-them-to-a-structured-db-for-analysis/18624>\
**Category:** Elasticsearch\
**Created:** [July 12, 2014, 3:09pm UTC](https://discuss.elastic.co/t/extracting-specific-fields-from-long-documents-and-moving-them-to-a-structured-db-for-analysis/18624 "2014-07-12T15:09:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajesh\_Iyer](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@Rajesh\_Iyer](https://discuss.elastic.co/u/Rajesh_Iyer)\
**Post date:** [July 12, 2014, 3:09pm UTC](https://discuss.elastic.co/t/extracting-specific-fields-from-long-documents-and-moving-them-to-a-structured-db-for-analysis/18624/1 "2014-07-12T15:09:12Z")

</div>

I am struggling with creating the following application

> Extract specific data  
> from 1000s of policies

- Searchable PDFs - can get full text directy
- Image PDFs - using Tesseract to OCR to get full text

> feed full policy text to ES and store the following indices

- Policy # - String
- Premium - $  
and store them so that the end of the day, I have a table in say Oracle  
like this:

Policy # Premium  
12345 $ 2314  
23451 $ 4231

And so on . . ..

There is a lot of analytics that I can do with this table (there is more  
fields I am execting to extract of course, ~ 7-10 total fields)

We can get the full text and we can feed to ES i one field.  
We are kinda on our way to create the indices we want

I just done know if there is a way to get the stored index data (label,  
value) out of ES into a structured DB table.  
If you have experience attempting something like this, Id love to hear  
about the feasibility/challenges of such an attempt.

Regards,

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/91dce4e2-e28b-444a-aef8-1a48c123c740%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/91dce4e2-e28b-444a-aef8-1a48c123c740%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![AsyncAwait](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asyncawait/32/1346_2.png) [@AsyncAwait](https://discuss.elastic.co/u/AsyncAwait)\
**Post date:** [July 13, 2014, 7:00am UTC](https://discuss.elastic.co/t/extracting-specific-fields-from-long-documents-and-moving-them-to-a-structured-db-for-analysis/18624/2 "2014-07-13T07:00:05Z")

</div>

So what is your question?

ES team has commercial support options in case you have enough bandwidth to help in overall design etc.,

Disclaimer: I am a open source enthusiast.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/59bc907b-9922-4938-baeb-38ba6f0cab1e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/59bc907b-9922-4938-baeb-38ba6f0cab1e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![AsyncAwait](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asyncawait/32/1346_2.png) [@AsyncAwait](https://discuss.elastic.co/u/AsyncAwait)\
**Post date:** [July 13, 2014, 7:00am UTC](https://discuss.elastic.co/t/extracting-specific-fields-from-long-documents-and-moving-them-to-a-structured-db-for-analysis/18624/3 "2014-07-13T07:00:17Z")

</div>

So what is your question?

ES team has commercial support options in case you have enough bandwidth to help in overall design etc.,

Disclaimer: I am a open source enthusiast.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/56b3b09a-dcc3-4d19-a430-3cae3f425c32%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/56b3b09a-dcc3-4d19-a430-3cae3f425c32%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [July 18, 2014, 7:39am UTC](https://discuss.elastic.co/t/extracting-specific-fields-from-long-documents-and-moving-them-to-a-structured-db-for-analysis/18624/4 "2014-07-18T07:39:39Z")

</div>

It is hard to answer a question like this because you do not specify which  
tools are available for you (clients, programming language, etc.) so the  
answer depends.

If you can write programs it is not very hard to query ES, look up the  
result docs, and execute appropriate SQL insert/update.

If you can not write programs and you want ES automatically do the SQL for  
you, this is not possible. The closest you can get is probably using a  
plugin like the CSV format plugin

> **[GitHub - jprante/elasticsearch-csv: CSV format for Elasticsearch REST search...](https://github.com/jprante/elasticsearch-csv)**
>
> CSV format for Elasticsearch REST search responses - GitHub - jprante/elasticsearch-csv: CSV format for Elasticsearch REST search responses

where you can extract values from ES into tabular data from command line.  
This CSV can be saved and used for RDBMS import.

Jörg

On Sat, Jul 12, 2014 at 5:09 PM, Rajesh Iyer [iyer70@gmail.com](mailto:iyer70@gmail.com) wrote:

> I just done know if there is a way to get the stored index data (label,  
> value) out of ES into a structured DB table.  
> If you have experience attempting something like this, Id love to hear  
> about the feasibility/challenges of such an attempt.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFBT30e5JjZ9XJD-tEZu6AFEJ\_Rv0fNq6sOvM\_sgR8SSg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFBT30e5JjZ9XJD-tEZu6AFEJ_Rv0fNq6sOvM_sgR8SSg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:15am UTC](https://discuss.elastic.co/t/extracting-specific-fields-from-long-documents-and-moving-them-to-a-structured-db-for-analysis/18624/5 "2017-07-06T01:15:02Z")

</div>


