Greetings!

I’m working with a set of encyclopedias, with the entry as the fragment root. I’m trying to weight my search results so that a search for “kennedy” ranks the entry for John F. Kennedy before the ones for Bay of Pigs and Cuban Missile Crisis. My initial attempt to do this is with the following query:

  cts:or-query

  ((

   cts:element-query(xs:QName("sage:def"),cts:word-query("kennedy",(),1)),

   cts:element-query(xs:QName("if:headword"),cts:word-query("kennedy",(),3))

  ))

However, this does not alter the order, and experimenting with cts:score shows no benefit from the headword query:

Entry                                        Score

Bay of Pigs                               348

Cuban Missile Crisis                  348

Kennedy, John F. (1917–1963)    348

Johnson, Lyndon (1908–1973)     290

Presidential Leadership, U.S.      290

 

What is the correct way to construct this query? Thank you for any help.

 

Marc Moskowitz

Interactive Factory

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to