Rob,

The behavior you describe is the behavior I would expect. If the similar-query input node is a database document, then it will be most similar to itself. Keep in mind that the input nodes don't have to be database documents, so it wouldn't make sense for the server to automatically skip the first match.

However, if you do not wish to display that first document to the user, simply skip over it and begin display from the second result.

-- Mike

On 2010-01-28 04:37, Whitby, Rob, Springer Healthcare wrote:
Hi

I’m getting odd results from cts:similar-query where the first result it 
returns is the same document:

let $uri := '/test.xml'
let $similar := fn:document-uri(cts:search(fn:collection(), 
cts:similar-query(fn:doc($uri)))[1])
return (
                 $uri,
                 $similar,
                 fn:compare($uri, $similar)
)

==>

/test.xml
/test.xml
0


Any ideas?

Thanks
Rob



_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to