Search Ranking Breakdown

Good Day, 

I've seen a few posts on how to prioritize search results by configuring Solr, but is there any information on how it ranks content for priority in the search results?

It looks like Tagging influences the results, and there is the option to populate only content X years old, but are there any other factors that may influence what populates on top and how those are weighted/ calculated? Do things like View Counts, Likes, etc. also impact the prioritization and weight of results populated? 

Parents
  • Hi Rachel

    Ranking is based on the solr config in solrconfig.xml within the solr configsets folders

    This controls how ootb telligent community scores during search, the snippets below are from v13 so may not be accurate depending on your version as they do tend to get tweaked in separate releases 

    Lets look at the core config elements and what effect they have on document ranking

    Say a user searches for "password reset".

    Solr in effect runs two queries simultaneously behind the scenes:

    Query 1 — Main search (title, body, attachments)
    Finds all posts where "password reset" appears in the title or content and scores them.

    Query 2 — Tag re-run (the tagMatch boost query)
    Takes the exact same search words ("password reset") and runs them again, but this time only against the tag field. If a post has the tag password-reset or password, it gets extra points added to its score from Query 1.

    The final score is:
    Final=Main score+Tag match bonus

    There are many other factors which can also influence the final score such as field ranking and other boosts 

    Field Based Boosting

    Depending on where in the indexed document the text appears effects the ranking 

    Field Multiplier What it means
    title ×10 Matching words in the title scores 10× more than body text
    content_plus ×1 (base) Body text and attachment text — the baseline
    tag_text ×0.01 Tags contribute very little to raw scoring on their own (more on this later)
    articleid / kmid ×40 Exact ID lookups score highest (used for direct-link searches, not typical keyword searches)

    the source for this in the config is 

    <!-- be aware of term-centric vs field-centric behavoirs when changing this -->
    <str name="qf"> 
    title^10 content_plus tag_text^.01 articleid^40 kmid^40
    </str>

    So there is a sneaky bit of boosting re article and km ids.....

    but elements like counts, likes have no effect as they are not stored in the solr index 

    Phrase-proximity boost rules

    The pf, pf2, and pf3 rules add extra query clauses that reward terms appearing together and in order

    <str name="pf">title content_plus^2</str>

    <str name="pf2">title^2 content_plus~3</str>

    <str name="pf3">title~1^3 content_plus~5^3</str>

    Closer words means more bonus
    If words are adjacent or nearly adjacent, the document gets more points than if those words are scattered.

    What this means for ranking:

    • A document with words next to each other in the right order gets extra points.
    • Title phrase matches are rewarded more strongly than body matches.
    • The pf2 and pf3 bonuses are added on top of normal term relevance, so exact/near-exact phrasing tends to move results upward significantly.

    Recency boost (date lift)

    After text scoring, a time-decay function multiplies every score

    <str name="dateBoostA">1</str>
    <str name="dateBoostB">2</str>
    <!-- 1 year = 3.16e-11 2 years = 1.58e-11 -->
    <str name="dateBoostReference">1.58e-11</str>
    <str name="dateBoost">recip(abs(ms(NOW/HOUR,date)),$dateBoostReference,$dateBoostA,$dateBoostB)</str>

    Recency boost applies a time-decay factor based on the date field.

    Newer items receive a higher factor, older items a lower one.
    This does not replace relevance; it scales the relevance score so freshness helps break ties and nudge newer content upward.

    Tag-match boost (separate bonus query)


    This is a separate bonus score added via a bq (boost query):

    <str name="tagMatch">_val_:"{!edismax qf=tag sow=true mm=1 pf='' pf2='' pf3='' boost=1 v=$q bq=}"</str>

    It re-runs the user's search against only the tag field and adds any tag match score on top of the main score.
    The key setting here is mm=1, meaning only one word needs to match a tag to trigger the bonus.

    Why is the qf tag weight ^.01 in "Field Based Boosting" but tags get a separate boost here?

    The low weight in "Field Based Boosting" prevents tags from swamping results when every post has generic tags.
    The separate boost adds a controlled extra bump specifically when the search words appear as actual tags on a post.

    These are the main steps which impact how a document is scored/ranked when searching

    So in summary,

    Telligent search ranking in the ootb configuration  is

    mostly keyword relevance with phrase-aware boosts
    then a moderate recency adjustment
    plus an additional tag-match bonus

  • Thank you Karl! 

    This is very helpful and I love the detail! Much appreciated

Reply Children
No Data