You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by "Jana, Kumar Raja" <kj...@ptc.com> on 2010/06/28 16:44:38 UTC
Limiting the extracted content
Hi,
We use Apache Tika in our application before sending the content to Solr
for Indexing. Some of our documents are pretty large (over 150 MB in
size with "only text" content over 30 MB). Processing such documents
often result in Out of Memory Exceptions during runtime. Ofcourse,
increasing the max heap does resolve this issue and another option we
use is to index in chunks of 5 MB.
On careful analysis, we realized that most of our keywords lie in the
first 1-2 MB of such documents and indexing that chunk suffices our
requirement. Is there any provision in Tika APIs to extract only the
first 1 or 2 MB (customizable) of the content instead of parsing the
entire document? If not, can someone point to which part of the code I
can play with to implement this?
Thanks,
Kumar
Re: Limiting the extracted content
Posted by Nick Burch <ni...@alfresco.com>.
On Mon, 28 Jun 2010, Jana, Kumar Raja wrote:
> We use Apache Tika in our application before sending the content to Solr
> for Indexing. Some of our documents are pretty large (over 150 MB in
> size with "only text" content over 30 MB).
What file formats are these in?
There are some file formats (eg text, csv) where you could fairly easily
get just the first bit. However, others (eg word, powerpoint) don't get
stored nice and linearly, and you have to process the whole file before
you can figure out where the start is...
Nick