Thanks for the quick reply, Danny. That's pretty much the answer I expected on the first question. I wanted to ask to be sure I wasn't missing something obvious and important.
On the second question, the scores were dropping further (which isn't important) but I also wasn't seeing the results I expected. Documents that I would have expected to be scored higher relative to others were not moving up the list. But I think I figured out why after looking more closely. First, in my list of elements for the cts:element-word-query section, I had one key element missing. Second, one of the other elements in that section had a nested structure that wasn't in my "element word query through" configuration. I switched to names of the actual child elements I wanted to use and the results are much more inline with expectations. I've sent these updates back for review, so hopefully this is the last you'll hear from me on it! Thanks again, Mattio On 6/24/08, Danny Sokolsky <[EMAIL PROTECTED]> wrote: > 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 > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
