Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 80266 invoked from network); 9 Dec 2009 08:27:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Dec 2009 08:27:20 -0000 Received: (qmail 1811 invoked by uid 500); 9 Dec 2009 08:27:19 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 1760 invoked by uid 500); 9 Dec 2009 08:27:19 -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 1749 invoked by uid 99); 9 Dec 2009 08:27:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 08:27:19 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mreutegg@day.com designates 207.126.148.87 as permitted sender) Received: from [207.126.148.87] (HELO eu3sys201aog101.obsmtp.com) (207.126.148.87) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 09 Dec 2009 08:27:16 +0000 Received: from source ([209.85.219.219]) by eu3sys201aob101.postini.com ([207.126.154.11]) with SMTP ID DSNKSx9fTttNtN++MEHh2QHX7/3FFR2ap8ig@postini.com; Wed, 09 Dec 2009 08:26:55 UTC Received: by ewy19 with SMTP id 19so1616086ewy.1 for ; Wed, 09 Dec 2009 00:26:54 -0800 (PST) MIME-Version: 1.0 Sender: mreutegg@day.com Received: by 10.216.85.209 with SMTP id u59mr3150510wee.109.1260347214589; Wed, 09 Dec 2009 00:26:54 -0800 (PST) In-Reply-To: <7bd519ad0912082236v29dab79et139d688b25e70c4e@mail.gmail.com> References: <7bd519ad0912082236v29dab79et139d688b25e70c4e@mail.gmail.com> Date: Wed, 9 Dec 2009 09:26:54 +0100 X-Google-Sender-Auth: 9a4863796d1cb463 Message-ID: Subject: Re: temporary node for similarity search From: Marcel Reutegger To: users Content-Type: text/plain; charset=ISO-8859-1 Hi, On Wed, Dec 9, 2009 at 07:36, Torgeir Veimo wrote: > Is there any way around not having to create a node when doing a > similarity search? > > I'd like to find matches between person profile tags and nodes with > tags. The profiles are not stored in jcr though, so it looks like i > have to create a jcr node in order to use SimilaritySearch? yes, the similarity function needs an existing node to start with. you could work around that by building your own query that mimics the similarity search. see: http://lucene.apache.org/java/2_0_0/api/org/apache/lucene/search/similar/MoreLikeThis.html for how this works behind the scenes. regards marcel > //element(*, nen:ad)[rep:similar(., '/nen:content/people/uid')] > > Also, one requirement I have is to be able to show all ads, but sort > on number of matches on tags. Thus is it possible to do a similarity > search, where i also get back hits without any similarity, but with > lower score? > > Currently we do this in java code, which require us to fetch all nodes > in a search result, which is a bit suboptimal. > > -- > -Tor >