Sorting results by relevance when hyperlinking in TinyMCE

Hello. I am trying to find how to go about sorting results by relevance instead of sort_on=sortable_title in the related items widget for Plone 5.0.6. I have searched far and wide and run into a handful of places where the query seems to be built across different products, and I am sure it will be best to see how the pattern is supposed to be used. Does anyone have some insight on how to accomplish this seemingly simple task? Thanks in advance.

1 Like

I recently read elsewhere (in the forum maybe?) that the default if you don't specify sort_on is by 'relevance', so perhaps a fix would be to delete sort_on=sortable_title in your customization. More generally could we have a default setting in the registry?

The setting sounds like a fantastic idea if it is not already set up that way. To the best of my knowledge, I did not set up a customization for internal linking. I am having a difficult time discerning where such a customization would live. It first appeared to be sourced in a mockup pattern (relateditems), but after searching through a handful of products including the plone mockup patterns, the cmfplone, plone.app.content, and plone.app.widgets, I am simply not sure which package to override. Do you have an idea of which package should be customized to remove the sort_on from the query that is sent to the vocabulary? I apologize for the elementary question. Perhaps the answer to this question is even more general. How might I trace the behavior that I see on the DOM back to the package that is driving the back end? Is there an easy path to trace? Thank you for any information that you may have.

The ranking quality of Plone is in general bad. So it does not make a huge difference from your experience to rely on Plone ranking at all. A reasonable ranking which is state of the art can only be accomplished using an external search with Solr or Elasticsearch.

-aj

Thanks for the tip AJ. In cmfplone 5.0.6, there is /patterns/init(). Settings config sort_on may be set to None, but as you suggest, the relevance ranking is not reflective of any reasonable ranking strategy. I will plan to use advanced query as I have for the site search features. I will attempt to add a custom vocabulary and post back.

I did have wonderful success using Advanced Query to rank results in a custom catalog vocabulary. Thanks all for your insight!

1 Like

Plone Foundation Code of Conduct