Reputation: 829
I'm using Apache Tika with Go to extract content from any type of files (.txt, .docx, .pdf etc) with below code.
file, err := os.Open("foo.docx")
if err != nil {
fmt.Println(err)
}
client := tika.NewClient(nil, "http://localhost:9998/")
body, err := client.Parse(context.Background(), file)
It's extracting content well, but the problem is, if the file size would be larger that time error could be generate Viz. memory out of bound.
So what I want to do here, I want to pass the file in chunks to Apache Tika server
, so that it extract content in chunks.
Upvotes: 0
Views: 897
Reputation: 732
Upvotes: 2