Extending Redmine Search for plugin resources

Added by André Cardoso almost 11 years ago

Hi.

I'm developing a plugin for redmine. It includes some features as notes and alarms into redmine. The thing is that we need to search all these new resources. So we wanted to be able to extend redmine search to go into our plugin, instead of creating a new search just for the plugin.

As a test, we made a modification into search_controller of redmine, adding our resource name to @object_types. In our model, we add acts_as_searchable :columns => ['title', 'content']...

This did not succeed. Something about "Unknown column 'projects.status'..."....

So my question:
is it possible in some way to alter search controller and our resource model so it can be integrated in redmine default search?

Please keep in mind that I am not an expert in rails, nor in redmine.

Thank you.

Replies (3)

RE: Extending Redmine Search for plugin resources - Added by Jan Ivar Beddari almost 11 years ago

Very interesting!

I can't help you but I'm on the same path so to speak. I use Subversion as a document management system (I know, its not supposed to do that, but it works) and Redmine as a client to that repository. I've started to look into how to create a full text index of the files in the svn repo, using some of the code from the docmgr project as a guideline for how it could be done.

When/if I'm able to generate an index, next step would be to find out how to get Redmine search to use those tables ..

RE: Extending Redmine Search for plugin resources - Added by Chaoqun Zou over 10 years ago

Hi, André
You should also make the model acts_as_event, the search controller use the attributs added by acts_as_event. And there is no way to add plugin's method to search scope, I'am requesting a plugin hook to do that.

RE: Extending Redmine Search for plugin resources - Added by Xabier Elkano over 9 years ago

Chaoqun Zou wrote:

Hi, André
You should also make the model acts_as_event, the search controller use the attributs added by acts_as_event. And there is no way to add plugin's method to search scope, I'am requesting a plugin hook to do that.

I am with same issue, I would like to extend search scope in a plugin.
Any news? Is there any way to do it.

(1-3/3)