jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: temporary node for similarity search
Date Wed, 09 Dec 2009 08:26:54 GMT
Hi,

On Wed, Dec 9, 2009 at 07:36, Torgeir Veimo <torgeir@netenviron.com> 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
>

Mime
View raw message