I have a couple of situations where I have a list of products and I want to display the most similar products to the article in question. How in a lot of situations there is no commonality between the article and any product or there is not enough products to fill the list. In this case I just want to display any product.
This modification attached changes the select to instead of being a filter it adds an embedded select to give a count of the number of terms in common between the argument and the row. This then changes the sort to allow you to sort by the number of terms in common and returns a list of products which are most similar by term to not similar at all.
I usually couple this with the random sort so that it would pick up different products.
| Comment | File | Size | Author |
|---|
Comments
Comment #1
jordojuice commentedMight the changes made in #1181566: Compatibility with views 3 also need to be applied to this patch?
Comment #2
freddybushboy commentedI haven't tried your patch but I think this would be a great feature!
It would be fantastic to have Similarity as a filter OR a sort that can be used without the filter.
Comment #3
doublejosh commentedFor anyone who happens across this post, there IS indeed a sort within Similar By Terms.
Additionally, you CAN pass in a list of TIDs via contextual filter and sort by match rate. You are NOT stuck only passing in a NID.
Yay!!!
Comment #4
luksakI guess we want to fix that in 8.x first. Also changing the title to something more useful.
Comment #5
shelaneComment #7
shelane