dokufreaks / plugin-cloud

GNU General Public License v2.0
19 stars 13 forks source link

tagcloud on a namespace searches globally #81

Open philippkrapp opened 2 years ago

philippkrapp commented 2 years ago

Hello!

When I use ~~TAGCLOUD:number>namespace1~~ the plugin may show the regarding most important words. When I then click on one of these keywords the search will search the entire index not limited to the predefined "namespace1".

Could this please be corrected?

I appreciated your effort!

dregad commented 1 year ago

I had a quick look a this today. The good news is that the tag plugin allows specifying a (single) namespace in the showtag action that could be leveraged to implement this functionality.

However, I'm not sure this is really feasible (at least not easily, without a complex refactoring possibly affecting also the tag plugin), because namespace1 could actually be multiple namespaces (as shown in the documentation) and when generating the cloud, the originating namespace currently is not kept so when it is rendered the necessary information is not available.

Additionally, in case a given tag is present in more than one namespace, how should the plugin determine which namespace to use as reference ?

Maybe someone with deeper knowledge of cloud and tag plugins than me, can come up with an idea.