It'd be useful to be able to skip nodes that already had X number of tags already, e.g. if an editor went to the trouble of adding six good tags to it a specific node then it would not be submitted.

CommentFileSizeAuthor
#4 autotagging-n527744.patch3.1 KBdamienmckenna

Comments

IncrediblyKenzi’s picture

Status: Active » Needs work

I'll go along with this one. Seems like a useful feature!

IncrediblyKenzi’s picture

Oop.. this is a bit trickier than expected. I'll ask for a bit of feedback as I'm not sure how we should do this:

1. Should this be a per-vocabulary limit? Since modules are responsible for their own vocabulary settings (when not inheriting from global setting), it's the module that's responsible for honoring the limit.
2. Should this affect node updates as well as inserts? this could potentially be a problem if content changes significantly for a given node.

Thoughts?

damienmckenna’s picture

This kinda plays in with #527750: Control whether submission should happen on INSERT and/or UPDATE. I was figuring it would only affect terms in the vocabulary that is selected for that content type, and setting it to 0 to ignore this option.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new3.1 KB

Here's a test run. It waits until after running the query and checks to see if the $max_terms value has been reached for that request's vocabulary. Food for thought.

IncrediblyKenzi’s picture

I've looked through the code; good patch.. Does this take into account things like tagthenet, which uses different vocabularies for different datatypes returned?

It'd also be nice (though I'm not certain that it's possible) to check the vocab before submitting the request.

damienmckenna’s picture

It works per vocabulary, so if the terms came back with multiple vocabularies it'll consider each one against a separate total.

Also, if you have multiple providers enabled and they're all going to the same vocabulary then as each one runs it will check against the increasing total. An example scenario:
* the max terms is set to 10, all terms go to one vocab ("Keywords").
* it queries OpenCalais and gets 8,
* it queries Yahoo, sees the total Keywords is less than 10 and adds on the new tags.
* Another node..
* it queries OpenCalais and gets 12,
* it queries Yahoo, sees the total Keywords is more than 10 and doesn't add the new tags.