core icon indicating copy to clipboard operation
core copied to clipboard

Search for text in PDF/DOC/ODT

Open onny opened this issue 14 years ago • 9 comments

Hello, is it possible to implement a "search for text" function in OwnCloud? I would like to grep for specific keywords in a list of documents.

Best regards, onny

onny avatar Oct 30 '12 23:10 onny

@butonic Can your lucene based search help us with this? THX

DeepDiver1975 avatar Oct 31 '12 09:10 DeepDiver1975

I am working on a lucene based search, but have not yet done a performance analysis. It currently completely replaces the existing search capabilities (so you will loose the ability to search in calendar events, contacts and artist or album names in media files) but it indexes pdf, text and html files whenever they change. To try it out, download the search_lucene app from my repository: https://github.com/butonic/apps/tree/search_lucene/search_lucene

After enabling the app upload a file. It will be indexed and you should be able to search the contents of the file by using the default search field in the top right. It will not automatically search partial words for performance reasons, but you can use the lucene query syntax: http://www.lucenetutorial.com/lucene-query-syntax.html

let me know if this works for you ... or just disable the app and everything should be back to normal ;)

butonic avatar Oct 31 '12 10:10 butonic

Didn't tested your addon yet but here's an interesting application called pdfgrep for the terminal which is extremly good in searching for text in pdfs: http://image.bayimg.com/be46b8b02ceb84e79366ede24a38a66590ebe347.jpg

onny avatar Nov 02 '12 00:11 onny

@butonic Isn't this fixed already?

MorrisJobke avatar Apr 16 '13 11:04 MorrisJobke

PDF works, odf / doc support not yet

butonic avatar Apr 16 '13 11:04 butonic

Update on this? ODF and DOC support?

jancborchardt avatar Aug 07 '13 18:08 jancborchardt

search_lucene currently indexes

  • [x] .docx
  • [x] .xlsx
  • [x] .pptx
  • [x] .odt
  • [x] .ods
  • [x] mimetype application/pdf (.pdf)
  • [x] mimetype text/plain (.txt)
  • [x] mimetype text/html (.html)

we do not support .doc files (binary Word 97–2003). a hack was posted on stackoverflow: http://stackoverflow.com/a/265017/828717 and http://www.dannyherran.com/2011/02/read-word-documents-with-php-up-to-word-2003/

official MS documentation: http://msdn.microsoft.com/en-us/library/gg615596(v=office.14).aspx#UnderstandMS_DOC_ExtractText

butonic avatar Aug 08 '13 16:08 butonic

tracking binary .doc file support in a new issue as an enhancement

butonic avatar Aug 08 '13 16:08 butonic

Hi can you tell me why search lucene doesn't seem to work with this pdf

http://samplepdf.com/sample.pdf

redknight101 avatar Aug 14 '13 01:08 redknight101