[MarkLogic Dev General] Query weights
Peter Hickman
peter.hickman at semantico.com
Tue May 8 09:15:18 PDT 2007
Thanks for that. We appear to have made some progress. Phrasing the
query like this seems to help, in fact you don't need to weight anything
and it gets the sort of results we want. Better still adding weights to
the element-word-query() query constructor weights the results in a sane
and understandable way.
Thanks for everyone's input, I feel so much better.
<results>{
for $x at $i in (cts:search(
/doc,
cts:or-query((
cts:element-word-query(xs:QName("dc:title"),"bach"),
cts:element-query(xs:QName("opp:body"),"bach")
))
))
return <result id="{$i}">
{ base-uri($x) } :
{ cts:score($x) } :
{ $x/opp:meta/dc:title/text() }</result> }</results>
--
Peter Hickman.
Semantico, Lees House, 21-23 Dyke Road, Brighton BN1 3FE
t: 01273 722222
f: 01273 723232
e: peter.hickman at semantico.com
w: www.semantico.com
More information about the General
mailing list