[MarkLogic Dev General] search:search() - show phrase results first
ryan.j.dew at gmail.com
Mon Mar 12 15:52:16 PDT 2012
You might want to look at the distance-weight option for the cts:word-query
"distance-weight=*number*"A weight applied based on the minimum distance
between matches of this query. Higher weights add to the importance of
proximity (as opposed to term matches) when the relevance order is
calculated. The default value is 0.0 (no impact of proximity). The weight
should be less than or equal to the absolute value of 16 (between -16 and
16); weights greater than 16 will have the same effect as a weight of 16.
This parameter has no effect if the word positions index is not enabled.
This parameter has no effect on searches that use score-simple or
score-random (because those scoring algorithms do not consider term
frequency, proximity is irrelevant).
I believe this can be passed as a term-option in your search options.
On Mon, Mar 12, 2012 at 4:47 PM, Michael Blakeley <mike at blakeley.com> wrote:
> Push back on that rule. The whole point of TF-IDF relevance ranking is to
> put the most relevant documents first. Trying to subvert that does a
> disservice to your users, and will frustrate you too.
> If a phrase match truly is more relevant than a word match, then TF-IPD
> ranking probably *will* show the phrase match before the word match. But if
> the word match turns out to have a higher score, let it appear first. Your
> users will thank you.
> -- Mike
> On 12 Mar 2012, at 21:26 , Danny Sinang wrote:
> > Hi,
> > Am looking to implement a business rule that says "Phrase results must
> be displayed before partials".
> > So if, using search:search(), I looked for the phrase "medical
> research", all results having that exact phrase should be shown first,
> followed by results for "medical" and "research".
> > A previous contractor managed to implement the generation of the phrase
> results + partials. But the problem is, some of the results for "medical"
> and "research" are displayed first because of their higher scores.
> > How do I tell MarkLogic to give phrase results a higher score instead ?
> > Regards,
> > Danny
> > _______________________________________________
> > General mailing list
> > General at developer.marklogic.com
> > http://developer.marklogic.com/mailman/listinfo/general
> General mailing list
> General at developer.marklogic.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the General