Martin, In response to a similar requirement to your second question, we have been doing exactly what you suggested - we store "Search Index Text" against the data. I guess it depends as to whether you are strictly constrained in terms of storage.
The added advantage of this approach is that when you want to display search results you don't need to process the original binary format in order to display a snippet of matching text from the file. Miro -----Original Message----- From: Martin Perez [mailto:[EMAIL PROTECTED] Sent: 27 October 2005 13:35 To: [email protected] Subject: Searching in file contents Hi again. Here goes another one about searching. I'm storing files on jackrabbit for later searching ( what innovative! ). Ok, I'm storing the content using the "jcr:data" property: node.setProperty("jcr:data",inputstream) being inputstream the stream with the file contents. The problem is that I don't know how to search later within that contents. The content can be sometimes binary (images, video, pdfs, ...) and sometimes text (html, xml, txt, ..) Currently I'm using the next query statement //*[jcr:contains(@jcr:data,'phrase')] So, first question, how to search within stream properties? And the second one. I'm migrating a repository system that was based on lucene. In that repository system, I was following the next process to index binary content: 1 - Try to extract the text from the file (pdf extractors, word extractors, excel extractors, etc..) 2 - Store the file contents in database or filesystem storage 3 - Index the text content. But now I have the problem of how to do word,pdf,excel, etc. management. One option is to extract the text and store both "extracted-text" and "content" as properties, but this will duplicate storage for these files. So, how would you handle storage and searching within binary text files like pdf or word ones? Thanks! Martin
