zabrane Mikael
2010-04-21 08:24:10 UTC
Hi List,
While extracting text&metadta from memory string, I got this exception:
.org.apache.tika.sax.WriteOutContentHandler$WriteLimitReachedException
Googling a bit, I found that this limit is set to 100K with the variable
"maxStringLength":
http://www.mail-archive.com/tika-commits-PPu3vs9EauNd/SJB6HiN2Ni2O/***@public.gmane.org/msg00468.html
How can I increse this limit to 10Mb please?
Here is my code:
ParseContext context = new ParseContext();
Parser parser = new AutoDetectParser();
BasicConfigurator.configure(new WriterAppender(new SimpleLayout(),
System.err));
Logger.getRootLogger().setLevel(Level.INFO);
context.set(Parser.class, parser);
InputStream input = new ByteArrayInputStream(data);
textHandler = new BodyContentHandler();
metadata = new Metadata();
parser.parse(input, textHandler, metadata, context);
input.close();
Thanks
Zabrane
While extracting text&metadta from memory string, I got this exception:
.org.apache.tika.sax.WriteOutContentHandler$WriteLimitReachedException
Googling a bit, I found that this limit is set to 100K with the variable
"maxStringLength":
http://www.mail-archive.com/tika-commits-PPu3vs9EauNd/SJB6HiN2Ni2O/***@public.gmane.org/msg00468.html
How can I increse this limit to 10Mb please?
Here is my code:
ParseContext context = new ParseContext();
Parser parser = new AutoDetectParser();
BasicConfigurator.configure(new WriterAppender(new SimpleLayout(),
System.err));
Logger.getRootLogger().setLevel(Level.INFO);
context.set(Parser.class, parser);
InputStream input = new ByteArrayInputStream(data);
textHandler = new BodyContentHandler();
metadata = new Metadata();
parser.parse(input, textHandler, metadata, context);
input.close();
Thanks
Zabrane