In the documentation: 
http://docs.marklogic.com/guide/search-dev/relevance#id_85289

The suggestion is to use the following to achieve a result that limits the 
distance between the words:
xquery version "1.0-ml";
cts:search(fn:doc(),
   cts:near-query(
     cts:and-query((
        cts:word-query("cat"),
        cts:word-query("dog") )),
     1000, (), 3) )

I'm trying to figure out what the difference is between that query and this 
query, with regards to the type of results I could get:
xquery version "1.0-ml";
cts:search(fn:doc(),
   cts:near-query(
     (cts:word-query("cat"),
        cts:word-query("dog") ),
     1000, (), 3) )

So far, I can't figure out what would I'd get with one that I wouldn't get with 
the other.  I even added 4 more sample docs, one with only "dog", one with only 
"cat", one with "cat" near "cat" and one with "dog" near "dog".  Whether I make 
the distance 1, 5, 10 and the weight 0, 1, 3, I get the same results regardless 
of which I run.  If there's something I should get with one or the other, what 
would the "document" look like?

Thanks,
David
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to