]> git.evergreen-ils.org Git - working/Evergreen.git/blob - docs/admin/search_interface.adoc
Docs: search scope info
[working/Evergreen.git] / docs / admin / search_interface.adoc
1 Designing the patron search experience
2 ======================================
3
4 Editing the formats select box options in the search interface
5 ---------------------------------------------------------------
6
7 You may wish to remove, rename or organize the options in the formats select
8 box. This can be accomplished from the staff client.
9
10 . From the staff client, navigate to *Administration -> Server Administration ->  Marc Coded
11 Value Maps* 
12 . Select _Type_ from the *Record Attribute Type* select box.
13 . Double click on the format type you wish to edit.
14
15 To change the label for the type, enter a value in the *Search Label* field.
16
17 To  move the option to a top list separated by a dashed line from the others,
18 check the *Is Simple Selector* check box.
19
20 To hide the type so that it does not appear in the search interface, uncheck the
21 *OPAC Visible* checkbox.
22
23 Changes will be immediate.
24
25 Adding and removing search fields in advanced search
26 -----------------------------------------------------
27
28 It is possible to add and remove search fields on the advanced search page by
29 editing the _opac/parts/config.tt2_ file in your template directory. Look for
30 this section of the file:
31
32 ----
33 search.adv_config = [
34     {adv_label => l("Item Type"), adv_attr => ["mattype", "item_type"]},
35     {adv_label => l("Item Form"), adv_attr => "item_form"},
36     {adv_label => l("Language"),  adv_attr => "item_lang"},
37     {adv_label => l("Audience"),  adv_attr => ["audience_group", "audience"], adv_break => 1},
38     {adv_label => l("Video Format"), adv_attr => "vr_format"},
39     {adv_label => l("Bib Level"), adv_attr => "bib_level"},
40     {adv_label => l("Literary Form"), adv_attr => "lit_form", adv_break => 1},
41     {adv_label => l("Search Library"), adv_special => "lib_selector"},
42     {adv_label => l("Publication Year"), adv_special => "pub_year"},
43     {adv_label => l("Sort Results"), adv_special => "sort_selector"},
44 ];
45 ----
46
47 For example, if you delete the line:
48
49 ----
50 {adv_label => l("Language"),  adv_attr => "item_lang"},
51 ----
52
53 the language field will no longer appear on your advanced search page. Changes
54 will appear immediately after you save your changes.
55
56 You can also add fields based on Search Facet Groups that you create in the
57 staff client's Local Administration menu. This can be helpful if you want to
58 simplify your patrons' experience by presenting them with only certain
59 limiters (e.g. the most commonly used languages in your area).  To do this,
60
61 . Click *Administration -> Local Administration -> Search Facet Groups*.
62 . Click *New*.
63 . Enter descriptive values into the code and label fields.  The owner needs to
64 be set to your consortium.
65 . Once the Facet Group is created, click on the blue hyperlinked code value.
66 . Click the *New* button to create the necessary values for your field.
67 . Go to the _opac/parts/config.tt2_ file, and add a line like the following,
68 where *Our Library's Field* is the name you'd like to be displayed next to
69 your field, and *facet_group_code* is the code you've added using the staff
70 client.
71 +
72 ----
73  {adv_label => l("Our Library's Field"), adv_filter => "facet_group_code"},
74 ----
75
76 Changing the display of facets and facet groups
77 -----------------------------------------------
78
79 Facets can be reordered on the search results page by editing the
80 _opac/parts/config.tt2_ file in your template directory.  
81
82 Edit the following section of _config.tt2_, changing the order of the facet
83 categories according to your needs:
84
85 ----
86
87 facet.display = [
88     {facet_class => 'author',  facet_order => ['personal', 'corporate']},
89     {facet_class => 'subject', facet_order => ['topic']},
90     {facet_class => 'series',  facet_order => ['seriestitle']},
91     {facet_class => 'subject', facet_order => ['name', 'geographic']}
92 ];
93
94 ----
95
96 You may also change the default number of facets appearing under each category
97 by editing the _facet.default_display_count_ value in _config.tt2_. The default 
98 value is 5.
99
100 Facilitating search scope changes
101 ---------------------------------
102
103 Users often search in a limited scope, such as only searching items in their
104 local library.  When they aren't able find materials that meet their needs in
105 a limited scope, they may wish to repeat their search in a system-wide or
106 consortium-wide scope.  Evergreen provides an optional button and checkbox
107 to alter the depth of the search to a defined level.
108
109 The button and checkbox are both enabled by default and can be configured
110 in the Depth Button/Checkbox section of config.tt2.
111
112 Noteworthy settings related to these features include:
113
114 * `ctx.depth_sel_checkbox` -- set this to 1 to display the checkbox, 0 to hide it.  
115 * `ctx.depth_sel_button` -- set this to 1 to display the button, 0 to hide it.
116 * `ctx.depth_sel_depth` -- the depth that should be applied by the button and 
117 checkbox.  A value of 0 would typically search the entire consortium, and 1 would
118 typically search the library's system.
119
120