Hi Mattio, Scores are only designed to be compared to other scores that come from the *same* search. The idea of scores is to affect the relevance of search matches compared with other search matches, not to be absolute numbers; that is, it will affect the order in which search results are returned (because they are returned in relevance order). So the number itself is only interesting in relation to the other scores returned from that same search. If you want to compare numbers between searches, use cts:confidence (or cts:fitness), which provides a normalized number between 0 and 1.
So the interesting question looking at your first 5 search result scores is not the number returned, but if it changes which documents are returned. Are your boosted element-word-queries moving up in the result set documents that match those terms in the boosted elements? -Danny -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mattio Valentino Sent: Tuesday, June 24, 2008 5:52 PM To: General Mark Logic Developer Discussion Subject: [MarkLogic Dev General] Adding more cts:queries and increasingweight lowers scores? Hello, I'm debugging some queries where the scoring doesn't seem to quite make sense, so I started simplifying things and the building them back up to see what was going on. I found two things I don't quite understand and I was wondering if someone could help me with that. 1) As I add more cts:query statements to my cts:search, the scores of the nodes decrease by a bit. I'm not overly concerned about this in general, but I'm curious why it happens. Here's an increasingly complex query and the scores of the top 5 nodes as an example: cts:word-query("folk music") -- 2447, 2447, 2447, 2446, 2445 cts:and-query(( cts:word-query("folk"), cts:word-query("music") )) -- 2228, 2226, 2226, 2224, 2219 cts:or-query(( cts:and-query(( cts:word-query("folk"), cts:word-query("music") )) , cts:and-query(( cts:element-word-query((xs:QName("title"), xs:QName("head"), xs:QName("entry-head")), "folk"), cts:element-word-query((xs:QName("title"), xs:QName("head"), xs:QName("entry-head")), "music") )) )) -- 2160, 2154, 2154, 2152, 2151 2) That last query is closest to what I'm running in my final XQuery module. What we also want to do is, when there are hits in head elements (as defined in the second cts:and-query), we want to have those items appear significantly higher in the list. When I added a weight of 16.0 to the cts:element-word-query leafs of the same query, the scores dropped even further. This is the one that caught me off-guard. I did check my "element word query through" settings and they seem to be correct. What am I missing here? Why would this happen? Here's the same query with the weights set and the scores of the top 5 results again: cts:or-query(( cts:and-query(( cts:word-query("folk"), cts:word-query("music") )) , cts:and-query(( cts:element-word-query((xs:QName("title"), xs:QName("head"), xs:QName("entry-head")), "folk", (), 16.0), cts:element-word-query((xs:QName("title"), xs:QName("head"), xs:QName("entry-head")), "music", (), 16.0) )) )) -- 2142, 2137, 2137, 2134, 2133 Thanks for any help with this! Mattio _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
