0
votes

I am trying figure out a way to rank search results according to a field that is not part of the search criteria. i.e. relevance of the search not only depend on the matches but documents also have a default relevance rank among themselves.

My searches so far has failed and could not confirm if it is even a supported feature; most cts:search documentation is about ranking matches.

So, is there a built-in marklogic feature that allow us to assign a value multiplier to documents; based on element values for example.

thanks a lot, K.

PS: I use marklogic 9.

2

2 Answers

1
votes

Look at cts:boost-query: it takes a primary query that has to match and a secondary query that just affects the score.

0
votes

You can alter the score based on the distance of a value in the document from a target value. See:

http://docs.marklogic.com/guide/search-dev/relevance#id_45452

You can also set the quality on the document to influence scoring. See:

http://docs.marklogic.com/guide/search-dev/relevance#id_68032

Hoping that helps.