From users-return-15529-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Thu Jul 08 04:11:56 2010 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 67223 invoked from network); 8 Jul 2010 04:11:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Jul 2010 04:11:56 -0000 Received: (qmail 83202 invoked by uid 500); 8 Jul 2010 04:11:56 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 82883 invoked by uid 500); 8 Jul 2010 04:11:53 -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 82874 invoked by uid 99); 8 Jul 2010 04:11:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 04:11:52 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=MSGID_MULTIPLE_AT,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [81.14.174.3] (HELO mail.iscad-it.de) (81.14.174.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 04:11:44 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.iscad-it.de (iRedMail) with ESMTP id C6BAB24FC5; Thu, 8 Jul 2010 06:12:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iscad-it.de; h= content-language:x-mailer:content-transfer-encoding:content-type :mime-version:message-id:organization:date:subject:in-reply-to :references:to:from:reply-to:x-virus-scanned; s=dkim; t= 1278562378; x=1279426378; bh=hWFuvzNwEnhv+m2j6vSstchxJuydGAuucgh rKijpdLQ=; b=ilQatFgw5yzMhtKmuxio8tgAtigoSBYOvTXWy/RKgvb19nO/84r +V09lPzhxRNQfh+KOt4sFqvYqA1zHcIfU7TI0nWsZ9phvTDVsyqH4/9dlF0r+XfO N9OXyklJKairdcGOr31sqMpIIYXilrYCdwzfrH3fSOZmXFI/OO2jjigs= X-Virus-Scanned: Debian amavisd-new at mail.iscad-it.de Received: from mail.iscad-it.de ([127.0.0.1]) by localhost (mail.iscad-it.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P5FYks7k28Jm; Thu, 8 Jul 2010 06:12:58 +0200 (CEST) Received: from dev0 (77-20-38-216-dynip.superkabel.de [77.20.38.216]) by mail.iscad-it.de (iRedMail) with ESMTPA id 2C4EF24FC3; Thu, 8 Jul 2010 06:12:57 +0200 (CEST) Reply-To: From: "Friedhelm Matten" To: "'Alexander Klimetschek'" , References: <8747983273305604316@unknownmsgid> In-Reply-To: Subject: AW: fulltext search sql excerpt sql2 jackrabbit 2.1.0 Date: Thu, 8 Jul 2010 06:11:24 +0200 Organization: ISCaD GmbH Message-ID: <000001cb1e53$a2147680$e63d6380$@matten@iscad-it.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsaNTVMkVfnwDxcRdWIPnjzWHLCigEHLgTA Content-Language: de X-Virus-Checked: Checked by ClamAV on apache.org Thanks, the xpath query will do it, but I can't work with joins. I need joins, or I must write several queries which collect the different data and must than match all. This will be a problem. Regards, Friedhelm -----Urspr=FCngliche Nachricht----- Von: Alexander Klimetschek [mailto:aklimets@day.com]=20 Gesendet: Samstag, 3. Juli 2010 00:17 An: users@jackrabbit.apache.org; friedhelm.matten@iscad-it.de Betreff: Re: fulltext search sql excerpt sql2 jackrabbit 2.1.0 On Fri, Jul 2, 2010 at 17:10, Friedhelm Matten wrote: > Hi, > > I would like to change from jackrabbit 1.6.2 to jackrabbit 2.1.0 > > and test following full text search > > select * from [nt:resource] AS resource where contains(resource.*, > '%DocumentText%') > > for Dokuments word, pdf,. . > > With > > =A0 =A0 =A0 =A0 =A0 =A0RowIterator ri =3D qr.getRows(); > > =A0 =A0 =A0 =A0 =A0 =A0while (ri.hasNext()) { > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Row row =3D ri.nextRow(); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 // = row.getValue("rep:excerpt(jcr:data)").getString(); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0double score =3D row.getScore(); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0logger.info("--->>>score: " + score); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Value excerpt =3D = row.getValue("rep:excerpt(jcr:data)"); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0logger.info("--->>>: " + excerpt); > > =A0 =A0 =A0 =A0 =A0 =A0} > > > There a result rows but excerpt is null. Hmm, might be a bug in JCR-SQL2. Otherwise you can continue to use your old query with JCR-SQL. It is deprecated in the JCR 2.0 spec, but Jackrabbit will still continue to support both jcr-sql and xpath from the 1.0 specification. Regards, Alex --=20 Alexander Klimetschek alexander.klimetschek@day.com