Project:Featured Content
Version:6.x-1.0-beta2
Component:User interface
Category:feature request
Priority:normal
Assigned:Kristen Pol
Status:closed (fixed)

Issue Summary

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

#1

Checked 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

#2

Status:active» needs review

#3

cool... 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) ;)

#4

This 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

#5

Status:needs review» closed (fixed)

#6

Great, thank you!

But it looks for me like nodes with 'zero' number of common terms
are displaying too... :] They shouldn't... :>

Thank you! :]

Szy.

#7

Category:feature request» bug report
Status:closed (fixed)» active

#8

It 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.

#9

I 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

#10

Nope, 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.

#11

I 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

#12

Unfortunately 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

#13

Category:bug report» feature request

#14

Status:active» closed (fixed)