none
Rank boosting for exact match RRS feed

  • Question

  • We've got 2 fields artist name and album name. The search term is "Michael Jackson" as artist name. What we would like to achieve is boost the exact match over other other matches (for example there is an artist in our index with the name Michael Jackson Mania!). How can we construct a FQL query to do that?

     

    Thank you very much.

    Thursday, May 19, 2011 2:07 PM

Answers

  • Hi,

    if your search fields has boundary-match="yes", then you can boost documents for exact matches, using the RANK or the XRANK operator.  This can work even if the field is not ranked by itself:

     

    query="michael jackson"

     

    Could be transformed into:

    query= XRANK("michael jackson", artist:equals("michael jackson"), boost=1000)

    This will give exact matches a rank boost of 1000.

    -Bjorn

    Thursday, May 19, 2011 3:27 PM

All replies

  • Hi,

    if your search fields has boundary-match="yes", then you can boost documents for exact matches, using the RANK or the XRANK operator.  This can work even if the field is not ranked by itself:

     

    query="michael jackson"

     

    Could be transformed into:

    query= XRANK("michael jackson", artist:equals("michael jackson"), boost=1000)

    This will give exact matches a rank boost of 1000.

    -Bjorn

    Thursday, May 19, 2011 3:27 PM
  • Thank you Bjorn,

    Is there a way to extract an artist entity at query time and boost the exact artist match?

    For example if the query="michael jackson thriller" boost the exact match for "michael jackson"

     

    Thank you very much

     

    Monday, May 23, 2011 7:21 AM
  • Hi,

    I don't think there is an OOB solution to do this for the general case.  There are a couple of things you can do to help boost "Michael Jackson" - the artist.

    1) In the index-profile, add an artist field, and then include that field in the composite/rank-profile with a strong boost for matches in the artist.  This will NOT limit you to full matches, but it will reward artists with all parts over others.  Of course, if one artist happens to be named "michael thriller", he probably will get as much of a boost as "michael jackson".

    2) Use phrase matching.  For this, your query has to use a query pipeline that includes the "didyoumean" query processor.  This query processor can include the proper name detection. The dictionaries used can be customized.  Example, a query for string("michael jackson thriller", mode="and")

    http://localhost:15100/cgi-bin/xsearch?offset=0&hits=10&query=string%28%22michael%20jackson%20thriller%22%2C%20mode%3D%22and%22%29&spell=1&qtpipeline=esp5

    this shows how the default dictionary (defined in $FASTSEARCH/etc/config_data/QRserver/webcluster/etc/qrserver/didyoumean/propername.xml):

    <QUERYTRANSFORM NAME="Original query" ACTION="NOP" QUERY="string("michael jackson thriller", mode="and")" CUSTOM="" MESSAGE="Original query" MESSAGEID="1"/>
    <QUERYTRANSFORM NAME="FastQT_DidYouMean" ACTION="Modified the query" QUERY="" CUSTOM="michael jackson->"michael jackson"" MESSAGE="Spellchecked phrase" MESSAGEID="6" INSTANCE="didyoumean"/>
    <QUERYTRANSFORM NAME="FastQT_DidYouMean" ACTION="Modified the query" QUERY=""michael jackson" thriller" CUSTOM="michael jackson thriller" MESSAGE="Transformed string node" MESSAGEID="13" INSTANCE="didyoumean"/>
    <QUERYTRANSFORM NAME="FastQT_DidYouMean" ACTION="Suggested new query" QUERY="string("\"michael jackson\" thriller", mode="simpleall")" CUSTOM="" MESSAGE="Transformed query" MESSAGEID="1" INSTANCE="didyoumean"/>
    <QUERYTRANSFORM NAME="FastQT_ResubmitQuery" ACTION="nop" QUERY="" CUSTOM="Resubmit off flag present, skipping resubmit." MESSAGE="Query not resubmitted" MESSAGEID="2" INSTANCE=""/>
    <QUERYTRANSFORM NAME="Final query" ACTION="NOP" QUERY="string("\"michael jackson\" thriller", mode="simpleall")" CUSTOM="FQL" MESSAGE="Final query" MESSAGEID="1"/>
    
    

    This shows that the query was in the end run as a combination of "michael jackson" and "thriller".  You can create your own list of artists, and have that replace the proper name dictionary (check Advanced Linguistics Guide).  You can also customize the query transform setup, to change what type of spelling should be done (e.g. what dictionaries do you want to use, single words, languages etc).  The default proper name list has many names, but is not complete (e.g. it doesn't include lady gaga).

    3) More elaborate solutions are possible.  Typically, it will involve some sort of query pre-processing.  You can use the new FSIS/IMS platform to look up the query terms in dictionaries, modify the search context etc to force boosting of complete matches in artists.  This will be a more substantial development project, no simple 2 line answers, I'm afraid.

    -Bjorn

    Tuesday, May 24, 2011 10:09 PM