[MarkLogic Dev General] RE: General Digest, Vol 43, Issue 1
Gary Vidal
gvidal at alm.com
Thu Jan 10 14:18:41 PST 2008
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
gvidal at alm.com
-----Original Message-----
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of
general-request at developer.marklogic.com
Sent: Thursday, January 10, 2008 3:00 PM
To: general at developer.marklogic.com
Subject: General Digest, Vol 43, Issue 1
Send General mailing list submissions to
general at 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
general-request at developer.marklogic.com
You can reach the person managing the list at
general-owner at developer.marklogic.com
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" <mattio.valentino at gmail.com>
Subject: [MarkLogic Dev General] Influence relevancy on a term not
used in the search phrase
To: "General Mark Logic Developer Discussion"
<general at developer.marklogic.com>
Message-ID:
<9e841ebd0801091223j3452fd53u6b77d4a21a29a86f at mail.gmail.com>
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 at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general
End of General Digest, Vol 43, Issue 1
**************************************
More information about the General
mailing list