It would be interesting if you could have a function that would
Dynamically add a score based on a predicate expression. 
Such as 
    cts:boost-score($cts:query, 16, 5000)

Where 
   1st param was the query to evaluate to the document score or quality.
   2nd param would be the quality weight to add based on the expression.
   3rd param would be the number of records to evaluate from current
returned results such that lower result items did not have to be
evaluated passed a certain result (kinda like a 2 phase query process)
   1st query results using the current search
   2nd boost any results that have the defined predicate expression.

I wouldn't know if this is technically possible or theoretically
incorrect but would be a powerful function.

Just as a note I first believed that you could use nested OR expressions
That would add weight if the OR expression evaluated to true

[base-query]
OR
  OR EXPR1 = range(2007 - 2000) weight: 16 
  OR EXPR2 = range(1999 - 1990) weight: 10
  OR EXPR3 = range(1989 - 1980) weight:  6
  OR EXPR4  range(< 1980) weight: -16

Unfortunately the expression does not evaluate the OR Expression in
computing the sore


Gary Vidal
Sr. .Net Developer
Tel: 212-592-4946
[EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, January 10, 2008 3:00 PM
To: general@developer.marklogic.com
Subject: General Digest, Vol 43, Issue 1

Send General mailing list submissions to
        general@developer.marklogic.com

To subscribe or unsubscribe via the World Wide Web, visit
        http://xqzone.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of General digest..."


Today's Topics:

   1. Influence relevancy on a term not used in the search phrase
      (Mattio Valentino)


----------------------------------------------------------------------

Message: 1
Date: Wed, 9 Jan 2008 15:23:11 -0500
From: "Mattio Valentino" <[EMAIL PROTECTED]>
Subject: [MarkLogic Dev General] Influence relevancy on a term not
        used in the search phrase
To: "General Mark Logic Developer Discussion"
        <general@developer.marklogic.com>
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1

I have a set of documents that are keyword searchable in MarkLogic.
They each have the year of publication set, e.g. <year>1972</year>.

I've been asked if I can influence the relevancy of the search results
based on the year of publication even if it wasn't used in the search
by the user.  The desired effect is that documents published recently
rank higher than documents published 30 years ago.

The only obvious way I can think to do this is by using document
quality.  Is there another approach?

Thanks,
Matt


------------------------------

_______________________________________________
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general


End of General Digest, Vol 43, Issue 1
**************************************
_______________________________________________
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general

Reply via email to