Danny,

Thank you for this.

The reindexer is enabled and the throttle is set to 5. It was reindexed, and I 
triggered it manually, just in case. Looked at the status summary to confirm 
that it happened. Happens quickly as the database is only 31MB.

I have not declared a default namespace, so I assume I leave that field blank?

<<inline: Screen shot 2010-01-15 at 4.59.51 PM.jpg>>


I changed the weight to 16 and just reindexed.

And _now_ I get what I expected!  

<hit score="1080">'Cautio Criminalis' Or A Book On Witch Trials</hit>
<hit score="1080">'Cautio Criminalis' Or A Book On Witch Trials</hit>
<hit score="990">Witchcraft and the Papacy</hit>
<hit score="945">I, Tituba, Black Witch of Salem</hit>
<hit score="855">Shaman of Oberstdorf</hit>
<hit score="855">Shaman of Oberstdorf</hit>
<hit score="855">"Evil People"</hit>
<hit score="765">With Paintbrush and Shovel</hit>
<hit score="765">Virginia Folk Legends</hit>

With a value of 99999, just an FYI, this query resulted in this:

for $hit at $count in cts:search(
  collection(),
  cts:word-query("witch")
)
return element hit {
  attribute score { cts:score($hit) },
  string($hit//b203)
}

=>

<hit score="1620">"Evil People"</hit>
<hit score="1620">Witchcraft and the Papacy</hit>
<hit score="1530">With Paintbrush and Shovel</hit>
<hit score="1530">Virginia Folk Legends</hit>
<hit score="1530">'Cautio Criminalis' Or A Book On Witch Trials</hit>
<hit score="1485">Shaman of Oberstdorf</hit>
<hit score="1485">I, Tituba, Black Witch of Salem</hit>

Maybe there is a bug in the way the value is being rounded down?

Also, I referenced "13.1.3, Adding a Weight to Boost or Lower the Relevance of 
an Included Element" in admin_guide and there is nothing documented about the 
weighting range.  

At any rate, thanks for your help!

Best,
Shannon

On Jan 15, 2010, at 4:40 PM, Danny Sokolsky wrote:

> Hi Shannon,
> 
> This does appear to be the right approach.  Did you reindex your database 
> after doing this (or wait for reindexing to complete if reindexing is 
> enabled)?  The word query include weights are built into the indexes.
> 
> Also, the weights should be between -16.0 and 16.0; a weight greater than 16 
> is rounded to 16, and a weight less than -16 is rounded to -16.
> 
> -Danny 
> 
> -----Original Message-----
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Shannon
> Sent: Friday, January 15, 2010 1:26 PM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] Word query included element weight
> 
> Hi,
> 
> If I want to boost the relevance of a title element in the search results in 
> an app deployed with Application Builder, would increasing the weight value 
> of word query includes within that database be the thing to do? I have tried 
> ramping it up, from 3 to 1000 to 99999, and it appears to have no effect.
> 
> Thanks,
> Shannon_______________________________________________
> General mailing list
> General@developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general

-- 
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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

Reply via email to