A trick with cts:near-query

Author: Dave Cassel  |  Category: Software Development

A reader recently emailed me a question about an old post on the MarkLogic developer’s mailing list. The goal was to run a query such that an element’s value and an attribute on that element both matched. The problem was that the queries the asker built would match one element’s value and a different element’s […]

Wildcards in MarkLogic date queries

Author: Dave Cassel  |  Category: Software Development

I have another reader question today, also from Amit. To summarize, he’s using the Search API and has set up a range constraint like so:   <options xmlns=”http://marklogic.com/appservices/search”>     <constraint name=”date”>    <range type=”xs:date” facet=”false”>         <element ns=”http://www.marklogic.com/app/meta” name=”Date”/>       </range>     </constraint> </options> So far, so good. But the query that […]

Controlling Search Scores

Author: Dave Cassel  |  Category: Software Development

Tonight’s post is based on a question from Amit, a reader: I am back again with a doubt. Now we know that the default algorithm used by Marklogic is “score-logtfidf” for the relevance calculation.  Now in my project, this is the default option as well, but what it is doing is it is giving preference […]