Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 59981 invoked from network); 3 Jan 2006 11:14:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Jan 2006 11:14:44 -0000 Received: (qmail 5221 invoked by uid 500); 3 Jan 2006 11:14:42 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 5198 invoked by uid 99); 3 Jan 2006 11:14:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2006 03:14:42 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mpermar@gmail.com designates 64.233.184.197 as permitted sender) Received: from [64.233.184.197] (HELO wproxy.gmail.com) (64.233.184.197) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2006 03:14:41 -0800 Received: by wproxy.gmail.com with SMTP id i2so225985wra for ; Tue, 03 Jan 2006 03:14:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=fgSJ+IfO8HkGH6Di8d26+TSwIFNRWMmD6zDtz7lA5v5/HcRLo8aO81OpJlKEWnn88Ctyn0KJZfGmo/hA4ywz+gZAsOSedlWumUxAHnR44EzO7tYE1FNbf8WGAO/F7G6cP55wHwhm/Di4YGTDDzvQP+2ommeA+1y8MCHRkMD8/AE= Received: by 10.54.150.20 with SMTP id x20mr1130737wrd; Tue, 03 Jan 2006 03:14:20 -0800 (PST) Received: by 10.54.136.12 with HTTP; Tue, 3 Jan 2006 03:14:20 -0800 (PST) Message-ID: <8fa1023f0601030314n305a450dx9384ebe12c52e343@mail.gmail.com> Date: Tue, 3 Jan 2006 12:14:20 +0100 From: Martin Perez To: jackrabbit-dev@incubator.apache.org Subject: Re: Strange search behaviour In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3340_27038055.1136286860593" References: <8fa1023f0601030124i624d1f97o9b65133dc47e242@mail.gmail.com> <8fa1023f0601030128q53666b49g50ed3b9bdc102eb9@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_3340_27038055.1136286860593 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks for the tip Marcel. I'll try it :) On 1/3/06, Marcel Reutegger wrote: > > I assume that the returned nodes are from the jcr:system tree which > contains versions of your nodes and node representations of your > nodetypes. > > Regarding performance, per default the query handler is configured to > return nodes in document order. This means that the query handler will > read all result nodes and order them how they appear in the workspace. > In your case using a XMLPersistenceManager this might not the the > most efficient setup ;) > > You can disable document order on result nodes with the following > parameter in the SearchIndex tag: > name=3D"respectDocumentOrder" value=3D"false" > > If you still have performance problems or think that the query returns > wrong results please post a jira issue with instructions how to > reproduce. > > regards > marcel > > On 1/3/06, Martin Perez wrote: > > Hi people, I hope you all a good new year. > > > > Today I have been testing my repository and I found a strange search > > behaviour that make me thought that it could be some bug on the search > > algorithm. > > > > Let's see. First of all, I'm using XMLPersistenceManager. I had one big > > repository with 500..1000 documents. All those documents had the conten= t > > indexed using the available text filters. Next I created a smaller > > repository with only two nodes, also with their content indexed with > > available text filters. > > > > Then I performed a xpath query over the smaller repository. Something > like > > this://*[@jcr:primaryType=3D'nt:file' and > > jcr:contains(@jlib:keywords,'test')]. As you see, is very simple, it > > searches for a term under a keywords property. That query went fine and > > returned very fast. > > > > But the problem, is when I performed another query. Something like this= : > > //*[@jcr:primaryType=3D'nt:resource' and jcr:contains(.,'test')] This > query > > tries to search the same term on the node binary contents. The query wa= s > > very very very slooooooow. So I decided to debug that query, and I saw > that > > the NodeIterator returned had over 270 nodes !!! How it can have 270 > nodes > > if the repository won't have more than 10? I suppose that is because th= e > > query was done also over the first repository, but then, is the XPath > query > > wrong? > > > > Thanks for your help! > > > > Martin > > > > > ------=_Part_3340_27038055.1136286860593--