Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matthew Jarvis 129 posts 129 karma points
    Sep 28, 2011 @ 17:13
    Matthew Jarvis
    0

    showScores

    Great package Douglas, what I wanted to have a bit of clarity over is the showScores,

    Is the score a reflection on the frequency of the search term in a document?

    I assumed that the score was the replica of the frequency but the score given for document containg the term 'courses' scored 17 with only 9 instances in my document.  Just wondered what the showScores are based on.

    Thanks

    Matt

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Sep 28, 2011 @ 17:26
    Douglas Robar
    0

    The score is the total weight of the search terms and where they are found. This is based on the order of properties in the searchFields="" macro parameter. As the docs explain, a search term found in a property listed nearer the start of the searchFields="" list will have a higher score. In other words, if the search term appeared in the document's name, then one can assume the whole page has something to do with the search term. If it appears in the bodyText property the page probably doesn't have quite as much to do with the search term. Though, if the search term appears a lot in the bodyText that should count more highly than if it only appears once.

    The total score, then, is based on both the number of times the term is found in each of the searchFields="" properties, heavily weighted to favor those that appear in properties that appear earlier in the searchFields="" property.

    What this means is that you can change the order of fields in the searchFields="" macro parameter to not only search in all the relevant docType properties for your site but also indicate which are more important for higher scoring... and XSLTsearch will always show the highest scoring results first.

    Hope that makes sense.

    cheers,
    doug. 

  • Matthew Jarvis 129 posts 129 karma points
    Sep 28, 2011 @ 17:56
    Matthew Jarvis
    0

    That Doug is a perfect answer.  Thanks for clarifying everything.

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft