Hi all,

currently, if you do a rep:similar() search [1], it will also return
the node that you specify as the base for searching other similar
nodes. Typically it will be the first search result, since the node to
itself is 100% similar. Here is an example:

Search:
//*[rep:similar(., '/content/foobar')]

Result (ordered by similarity by default):
- /content/foobar
- /content/other/similar/node
- /also/similar
- /not/so/similar
- /very/different

IMHO we should exclude the node (/content/foobar) from the result, as
I think most people would not expect it there. But since this works
that way already in several released versions (rep:similar is
available since 1.4), we have to think about use cases where code
might actually rely on this behaviour.

WDYT?

[1] http://wiki.apache.org/jackrabbit/SimilaritySearch

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]

Reply via email to