Add a new sorting option so that you can sort the list of content by the closest match determined by the number of terms in common. For example:
node/1 has terms dog, cat, frog, duck, goose, fish
node/2 has terms dog, cat, goose, fish, mouse, crocodile
node/3 has terms frog, goose, fish, alligator
node/4 has terms dog, cat, frog, duck, goose, fish, alligator
node/5 has terms alligator, crocodile, mouse
If we are viewing node/1 and want to show a list of content that is sorted by closest match (by terms), then we would show:
node/4
node/2
node/3
node/5
Comments
Comment #1
kristen polChecked this into dev so will be there after next drupal cron. Options are:
Closest Match to Current Page by Terms
Furthest Match to Current Page by Terms
Only does the sort if you are on a node page.
Kristen
Comment #2
kristen polComment #3
green monkey commentedcool... real cool
the site I'm working on now, the terms are single and simple - made pathing real simple
but I can see this as being very useful for gathering more precise related content for multi selects
---
came across something today that stumped me for a few minutes
Feeds - have a feed that does not send over any Tags to match against
there are keywords in the body (desc) but as normal text - eg. the blue dog jumped over the fence
where dog "is" a term found in a vocab for other content types
I'm thinking that to match against text in the body would slow down the system and be cumbersome to say the least, but have to admit - thinking about matching on body text does cause me to drool
I'm thinking this module has spoiled me, using Random for now and it works just fine :))
(drooling is good from time to time, after all it put a man on the moon and everyone thought it was rocket fuel - nope good old drool) ;)
Comment #4
kristen polThis is in beta3.
Note that if you have the search module turned on, there is a search index table with words from the body text. I was thinking about doing something similar to the closest terms sort for search keywords. Sounds like what you want is more of a hybrid... it would match closest if it the most matching words from both terms and search keywords (from text)... yes?
I'm closing this one, but we could open a new one for the search keywords.
Kristen
Comment #5
kristen polComment #6
szy commentedGreat, thank you!
But it looks for me like nodes with 'zero' number of common terms
are displaying too... :] They shouldn't... :>
Thank you! :]
Szy.
Comment #7
szy commentedComment #8
szy commentedIt is probably because of '[My vocabulary] Terms Filter Options':
when I don't check any term, it won't turn the vocabulary off,
like I want it to.
Szy.
Comment #9
kristen polI was showing them intentionally even if they don't have any terms but perhaps I should make that configurable in an obvious way.
For now, you should be able to check all the checkboxes like:
"Use the abc terms of the page being shown."
and it will do what you want.
Kristen
Comment #10
szy commentedNope, it doesn't.
These are my settings:
-> http://www.nitka.pl/misc/drupal_100225.jpg
I want nodes to be matched only by Tag, not by Kategoria.
Szy.
Comment #11
kristen polI will look into that... meanwhile...
I did some research and played around with the views group by module and you can sort by closest match (by terms)... Here's how:
http://www.kristen.org/content/use-drupal-views-group-module-show-closes...
You need to install the views group by module before importing the view.
Kristen
Comment #12
kristen polUnfortunately the UI isn't as intuitive as I'd like as outlined here: http://drupal.org/node/705308
In addition to checking the checkbox, you will need to select the
"Use the tags selected below" (and not select anything) for it to work.
If you have feedback on how to make that more intuitive, please leave a comment at: http://drupal.org/node/705308
Thanks,
Kristen
Comment #13
kristen polComment #14
kristen polComment #15
kristen polunassigning old issues