I have a "more like this" block, and each node has a SOLR indexed decimal value "rating". I am trying to set this as the sort in the view, but the content isn't being sorted by this value.

Any ideas?

Thanks mate.

Comments

drunken monkey’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Category: bug » feature

Sorry, in its current implementation the results in the MLT block can't be sorted or filtered. This has to do with Solr internals, we'd have to use a different system to allow this.
Leaving this as a feature request for now, maybe someone will implement it.

On the other hand, when sorting by anything else than relevance, you'll likely get results which are hardly at all like the current node, so such a feature would be dangerous.

modstore’s picture

Actually, thats a good point. Now that I think about it I would need it sorted by relevance first, and because there is typically a lot of nodes of high relevance, I want the 5 most relevant displayed sorted by rating value. I think I am best off just using a hook to do this, as it is specific to my implementation.

EDIT: Although, I think it would be a nice feature to return results above a certain relevance, but sorted by another field.

Thanks Drunken Monkey, glad you're back!

Nick_vh’s picture

Title: More Like This - sort not working » Add the ability to Sort the More Like This Content
Version: 7.x-1.x-dev » 8.x-1.x-dev
Issue summary: View changes

I haven't checked the latest code yet but seems to me that having a sort for the more like this blocks seem like a quite reasonable feature request. Bumping it up to D8

Andre-B’s picture

@Nick_vh how would the sorting work in theory? mlt should by default sort by relevance, sorting by anything else than relevance wouldn't be mlt at all? only thing I can think of is sorting by timestamp (new nodes first) - but shouldn't that be some sort of internal relevance boosting? filtering the results by relevance (for a minimum relevance) and then sorting them should provide somewhat relevant results, but that would bypass solr, so it does not seem to make much sense.

Andre-B’s picture

legolasbo’s picture

Status: Active » Closed (outdated)

This issue has not seen activity in over 2,5 years. I am therefore closing this issue to clean up the issue queue. Feel free to re-open and update this issue if you feel this issue is still relevant and of importance.