プロジェクト

全般

プロフィール

Vote #65774

完了

configurable list of models to include in search

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Search engine_16
対象バージョン:
開始日:
2009/09/28
期日:
進捗率:

0%

予定工数:
category_id:
16
version_id:
14
issue_org_id:
3936
author_id:
517
assigned_to_id:
0
comments:
5
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

It would be nice to be able to configure (and especially add to) the list of object types that the search engine considers. At present the list is hard-coded in the "search controller":http://www.redmine.org/projects/redmine/repository/entry/trunk/app/controllers/search_controller.rb#L51

For an in-house customization I needed to include a new searchable model class into the search engine. To do this I had to override the SearchController#index method, but it would have been nices to be able to modify a configuration parameter to simply add a new model type to the @object_types array.


journals

--------------------------------------------------------------------------------
Just out of curiosity, how would I use this change to add search functionality from a plugin?
--------------------------------------------------------------------------------
will this also address search (fulltext) capabilities for the repositories ?
--------------------------------------------------------------------------------
It appears that this is complete.

Alex Bevilacqua wrote:
> Just out of curiosity, how would I use this change to add search functionality from a plugin?

If you put this into your plugins' init.rb, this should add the Deliverable model:

<pre><code class="ruby">
Redmine::Search.map do |search|
search.register :deliverables
end
</code></pre>
--------------------------------------------------------------------------------
More info about how to implement this in a plugin can be found on #3021 "#note-4":http://www.redmine.org/issues/3021#note-4.
--------------------------------------------------------------------------------


related_issues

relates,Closed,4800,Ability to add search providers from plugins
duplicates,Closed,3021,Extend search with plugins

Admin Redmine さんが約4年前に更新

  • カテゴリSearch engine_16 にセット
  • 対象バージョン1.0.0 (RC)_14 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0