[MarkLogic Dev General] Is there a score threshold?

Danny Sokolsky dsokolsky at marklogic.com
Thu Jun 28 11:02:13 PDT 2007


Hi Peter,

There are two things to consider here:  

  * whether documents match the search, 
  * and what is the score of the search result

You can have a result item with a score of 0 and it will still return
from cts:search. The score determines the order in which results return
from the search (so low or 0 scores would sort toward the end of the
result set).  If a document does not return, it means it does not match
the cts:query expression used in the cts:search (or the result does not
occur under the XPath in the first argument of cts:search).

I can think of a query that would explain the results you are seeing,
but that is just speculating.  For example, if the query is something
like:

  cts:and-query((
       cts:word-query("bronze"), 
       cts:element-word-query(xs:QName("title"), "bronze") 
               ))

That would not match a document with the word "bronze" somewhere other
than the title.

What, exactly, is the cts:search you are doing (including the
cts:query)?

-Danny

-----Original Message-----
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Peter
Hickman
Sent: Thursday, June 28, 2007 6:19 AM
To: MarkLogic ML
Subject: [MarkLogic Dev General] Is there a score threshold?


I am searching my documents using the default scoring system with 3.1-5 
and searching the whole document from the root element.

When I search for the article by it's title "Indian subcontinent" I can 
find it, plus other articles that have that phrase. But the title is 
weighted with a 16.

But when I search for the word "bronze", which is in the article but not

in the title the article is not returned. Even if I search for "indian 
subcontinent bronze" I can't find it.

The only thing that occurs to me is the article in question is very 
large (nearly 5m and quite conplex compared to the 10k and simple of 
99.99% of the rest of the articles). Could the size of the document 
result in the score being so small as to be effectively zero and 
therefore the document is not returned?

-- 
Peter Hickman.

Semantico, Lees House, 21-23 Dyke Road, Brighton BN1 3FE
t: 01273 358223
f: 01273 723232
e: peter.hickman at semantico.com
w: www.semantico.com

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


More information about the General mailing list