RedmineSearch » History » Version 4

James Rowe, 2010-11-08 21:33
more advanced controller notes

1 1 James Rowe
h1. RedmineSearch
2 1 James Rowe
3 1 James Rowe
A part of any project management process is spent looking for existing information. Enter the Redmine search capability.
4 1 James Rowe
5 1 James Rowe
h2. Search
6 1 James Rowe
7 4 James Rowe
At the top right-hand side of Redmine is a simple search box. Type anything and press enter to search.
8 1 James Rowe
9 4 James Rowe
Searching for #{IssueID} or {IssueID} will go straight to the issue. Search parameters can be enclosed in double quotation marks.
10 4 James Rowe
11 1 James Rowe
!SimpleSearch.png!
12 1 James Rowe
13 1 James Rowe
Depending on permission settings and project membership a drop down menu option may show the current project. Simple search searches full text on the project currently displayed in that chooser.
14 1 James Rowe
15 1 James Rowe
!SearchProjects.png!
16 1 James Rowe
17 1 James Rowe
Clicking on the word *Search* will immediately take you to the advanced search and results page. Notice the project chooser has followed, and there are checkboxes to limit search to specific types of entries. The checkboxes displayed only if the module is enabled at that project level.
18 1 James Rowe
19 1 James Rowe
!AdvancedSearch.png!
20 1 James Rowe
21 1 James Rowe
h2. Search configuration
22 1 James Rowe
23 2 James Rowe
h3. Search titles only
24 2 James Rowe
25 2 James Rowe
From the advanced search box, *Search titles only* can be enabled to limit results.
26 2 James Rowe
27 2 James Rowe
h3. Search custom fields
28 2 James Rowe
29 1 James Rowe
Don't forget to set custom fields checkbox *Searchable* to true to also search these fields.
30 1 James Rowe
31 1 James Rowe
!Searchable.png!
32 2 James Rowe
33 2 James Rowe
h2. Results
34 2 James Rowe
35 2 James Rowe
Here is a sample results page from this site on "test issue".
36 2 James Rowe
37 3 James Rowe
* Many links to go to what was found.
38 2 James Rowe
* Unique text highlighting by search terms.
39 2 James Rowe
* Capability to jump to groupings of results (ie News items).
40 2 James Rowe
* Leading icons to categorize type of result (ie changeset, issue, comment)
41 2 James Rowe
42 1 James Rowe
!Results.png!
43 4 James Rowe
44 4 James Rowe
h2. Search controller
45 4 James Rowe
46 4 James Rowe
Always check the source first:
47 4 James Rowe
48 4 James Rowe
source:/trunk/app/controllers/search_controller.rb
49 4 James Rowe
50 4 James Rowe
A more advanced look at the controller explains some of the above behavior:
51 4 James Rowe
52 4 James Rowe
* Only searches the first 5 tokens of a search
53 4 James Rowe
* Tokens must be at least 2 characters long
54 4 James Rowe
* Results are returned in paginated sets of 10