0

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.

Kemal Erdogan
  • 1,060
  • 1
  • 9
  • 19

2 Answers2

1

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

mholstege
  • 4,902
  • 11
  • 7
0

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.

ehennum
  • 7,295
  • 13
  • 9