# How to index (and search) large strings

**URL:** <https://discuss.elastic.co/t/how-to-index-and-search-large-strings/187646>\
**Category:** Elasticsearch\
**Created:** [June 26, 2019, 6:05pm UTC](https://discuss.elastic.co/t/how-to-index-and-search-large-strings/187646 "2019-06-26T18:05:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![denmcktr](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@denmcktr](https://discuss.elastic.co/u/denmcktr)\
**Post date:** [June 26, 2019, 6:05pm UTC](https://discuss.elastic.co/t/how-to-index-and-search-large-strings/187646/1 "2019-06-26T18:05:59Z")

</div>

Need some advice in dealing with large strings of data. It is our goal to OCR documents and make their text fully searchable. So far, we've been indexing the text without any issues, but recently have run into Lucene errors once we hit strings exceeding 32K characters.

What is the standard approach for dealing with large pieces of text like this, e.g. 500K+ characters? Is there a setting that will allow this or do we need to change our whole approach and indexing the data differently? Any guidance would be appreciated...

Thanks!

---

<div class="post-metadata">

**Author:** ![denmcktr](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@denmcktr](https://discuss.elastic.co/u/denmcktr)\
**Post date:** [July 8, 2019, 1:43pm UTC](https://discuss.elastic.co/t/how-to-index-and-search-large-strings/187646/2 "2019-07-08T13:43:27Z")

</div>

Was thinking of attempting to break apart large pieces of text into an array (instead of one gigantic field). Would this be a suitable solution? Any better options?

---

<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 5, 2019, 1:43pm UTC](https://discuss.elastic.co/t/how-to-index-and-search-large-strings/187646/3 "2019-08-05T13:43:33Z")

</div>

Closed on August 5, 2019, 1:43pm UTC

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