Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 42139 invoked from network); 18 Apr 2007 20:11:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Apr 2007 20:11:58 -0000 Received: (qmail 88083 invoked by uid 500); 18 Apr 2007 20:12:04 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 87759 invoked by uid 500); 18 Apr 2007 20:12:03 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 87746 invoked by uid 99); 18 Apr 2007 20:12:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2007 13:12:03 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [216.170.99.246] (HELO mail.authsum.com) (216.170.99.246) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2007 13:11:56 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.authsum.com (Postfix) with ESMTP id 1240678204 for ; Wed, 18 Apr 2007 16:11:36 -0400 (EDT) X-Virus-Scanned: amavisd-new at X-Spam-Score: -3.93 X-Spam-Level: Received: from mail.authsum.com ([127.0.0.1]) by localhost (mail.authsum.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9QJGVDEK0IcF for ; Wed, 18 Apr 2007 16:11:35 -0400 (EDT) Received: from mail.authsum.com (mail.authsum.com [216.170.99.246]) by mail.authsum.com (Postfix) with ESMTP id 685FA7813F for ; Wed, 18 Apr 2007 16:11:35 -0400 (EDT) Message-ID: <16307183.4201176927094981.JavaMail.root@mail.rhoderunner.com> Date: Wed, 18 Apr 2007 16:11:34 -0400 (EDT) From: Phillip Rhodes To: users@jackrabbit.apache.org Subject: BinaryValue does not get indexed In-Reply-To: <22502847.4181176923764555.JavaMail.root@mail.rhoderunner.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [209.166.180.139] X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-3.93 tagged_above=-10 required=6.6 tests=[ALL_TRUSTED=-1.8, AWL=0.469, BAYES_00=-2.599] I am adding BinaryValue properties to my nodes. It appears that jackrabbit is not indexing the values of the BinaryValue even if the contents represent a string. If I add the String value as a StringValue, the value is indexed and picked up in a contains search. I have 2 issues with this: 1) String property values have a limit of around 16000 characters because the SimpleDBPersistence adapter will store the value in a BLOB field. I get Mysql data truncation errors unless I chop the data down to 16000 characters. In addition, I am doubling my space requirements. No only do I have to store my binary content, by it's string representation in the node. 2) I use a byte[] array throughout my application has a means to store pdf files, image files, text files, etc... It is a "common denominator for all content" PDF files, image files, wiki entries, etc... all can be stored, passed around, retrieved as a byte[] array. I would like to figure out how to get jackrabbit to index the byte[] array properly. 3) Not an issue, but a question. How does jackrabbit know that a node is a pdf document? It must figure it out somehow because I see that there is support in the SearchIndex to configure pdf extractions. Do I add "jcr:mimeType" property of application/pdf to my pdf node and that will do it? Will this solve the first 2 issues?? I appreciate your thoughts on this! My Code: String contentText= "this is a unique piece of text"; byte[] bytes = contentText.getBytes(); node.setProperty("content", new BinaryValue(bytes)); if (content.length() > 16000) { contentText= contentText.substring(0, 16000); } node.setProperty("worksproperty", new StringValue(contentText)); This is my xpath query: //*[jcr:contains(.,'unique')]