Search configuration
General config
Folio is installed with the default search set as the keyword search.
If you would prefer to have a different search as your default then you should change the defaultSearch setting in gno_startup:
- Go to OPAC> Configuration Settings.
- Search for defaultSearch.
- Open in modify and change the Value field to a valid search option:
- “kws2” (Keyword search)
- “tiau” (Title/Author search)
- “adv” (Advanced search)
- “isbn” (ISBN search)
- “subject” (Subject search)
- “name” (Author search)
- “classmark” (Classmark search).
Search Config Blocks
All searches (except for the Advanced search) are configured in the same way and have their own Config Block, e.g.
- g_tiau - title/author search
- g_kws2 - keyword search
- g_subject - subject search
- To view these go to OPAC> Configuration Settings.
- Search for searchfields.
- Click the Setting link to view details.
For example the searchfields array in g_kws2 has a single entry:
Config Block | g_kws2 |
---|---|
Setting | searchfields |
Description | A list of search fields, optional labels, hover text and in-field prompts for the search boxes |
Value | "keywords Keyword(s):" |
Value 2 | "Some words to describe the item you are looking for" |
Value 3 | "Enter one or more words and click Search (or hit Enter) to find records that include all the words you entered" |
Allowable values | Value 1 is the search field. It must start with one of: title, name, keywords, subject, isbn, classmark, ctrl or note10. This can then be followed by a space and a label for the search box if desired. |
Sequence 1 | 22 |
Sequence 2 | 1 |
Include? | Yes |
The Value field holds the search input field and it’s label (any words after the 1st space are the label). The Value 2 field holds the hover text and the Value 3 field holds the infield help text.
For example, if you remove the text from the Value 3 field then the search box will not include any infield help text.
The Title/Author search is a little different as it has 2 entries in the searchfields array because it has 2 search fields: title and author.
Default sort
You can configure a default sort order for each search option if required. The default sort order for the hitlist is defined by configuration settings in the g_title_hitlist config block:
- def_sort1
- def_sort2
- To view these go to OPAC> Configuration Settings.
- Choose Configuration Settings by Config Block to search.
- Enter Config Block: g_title_hitlist; Setting: def_sort.
The Value fields of these settings are set to "tia" and "aua" as standard.
Keyword search
The Keyword search is designed so that records containing the words you searched for as a phrase, will automatically appear at the top of the keyword search hitlist. This is above the records that contain all the words you searched for but are not next to each other.
The phrase you enter does not require quotation marks.
Note: for the results to display like this, the end user needs to use the Sort by drop down to sort the results by Relevance. However, the library can configure Relevance to be the default sort order automatically:
- Create a new def_sort1 setting in the g_kws2 config block.
- Set the Value field to "rel".
- Create a new def_sort2 setting in the g_kws2 config block.
- Set the Value field to "tia" so that items with the same score are then sorted by title.
Advanced search
The Advanced search differs from the other searches as it appears with a single search field by default, with the ability to add up to 3 further search fields.
The user clicks the Add Field [plus sign] icon to display additional search fields.
You can configure which searches are available in the Advanced search by editing configuration settings in g_adv. There are 8 settings in the searchfields array and you can edit these settings to control which options you have available and the order in which they display.
- Go to OPAC> Configuration Files and search by Configuration Settings by Config Block.
- Search for Config Block: g_adv and Setting: searchfields.
This displays the searchfields array:
Config Setting ID | Interface | Config Block | Setting | Value | Sequence 1 | Sequence 2 | Include? |
---|---|---|---|---|---|---|---|
604133 | 1 | g_adv | searchfields | "keywords Keyword(s)" | 23 | 1 | Y |
604134 | 1 | g_adv | searchfields | "keywords2 Keywords in Title" | 23 | 2 | Y |
604135 | 1 | g_adv | searchfields | "name Author" | 23 | 3 | Y |
604137 | 1 | g_adv | searchfields | "subject Subject" | 23 | 4 | Y |
604138 | 1 | g_adv | searchfields | "classmark Classmark" | 23 | 5 | Y |
604139 | 1 | g_adv | searchfields | "isbn ISBN" | 23 | 6 | Y |
604140 | 1 | g_adv | searchfields | "ctrl Control number" | 23 | 7 | N |
604141 | 1 | g_adv | searchfields | "note10 Note" | 23 | 8 | N |
- Open the Setting of e.g. Classmark, in modify mode.
- Change Sequence 2 of one or more searchfields to change the order of display in the Folio drop downs.
- Set Include =Yes / No to determine whether it appears in the Folio drop down.
The Add Field icon and it’s text is controlled by the addSrchFldButtonTitle setting in g_adv:
Config Block | g_adv |
---|---|
Setting | addSrchFldButtonTitle |
Value | "Add another search field" |
Immediate display of search fields
You can configure Folio so that the fields available in the drop down are displayed immediately when the Advanced search is selected.
Choose which of these 4 searches are shown and the order in which they are displayed. By default Folio is configured with just the original Keyword search. To add more searches for immediate display:
- Go to OPAC> Configuration Files and search by Configuration Settings by Config Block.
- Search on Config Block: g_adv; Setting: searchfields_display to show this array.
Config Setting ID | Interface | Config Block | Setting | Value | Sequence 1 | Sequence 2 | Include? |
---|---|---|---|---|---|---|---|
604143 | 1 | g_adv | searchfields_display | "keywords Keyword(s)" | 24 | 1 | Y |
604144 | 1 | g_adv | searchfields_display | "keywords2 Keywords in Title" | 24 | 2 | N |
604145 | 1 | g_adv | searchfields_display | "name Author" | 24 | 3 | N |
604146 | 1 | g_adv | searchfields_display | "subject Subject" | 24 | 4 | N |
By default, only "keyword" has Include?=Yes.
- Click the e.g. "name Author" setting to display the details:
Include? | Yes |
---|---|
Config Block | g_adv |
Setting | searchfields_display |
Description | The search fields to display when the Advanced Search form is first displayed. Must match the first 4 fields in the searchfields array. |
Value | "name Author" |
Value 2 | "Authors' names" |
Value 3 | "Enter the author's name, e.g. smith or smith, john or john smith" |
Allowable Values | Value 1 is the search field. It must start with one of: title, name, keywords, subject, isbn, classmark, ctrl or note10. This can then be followed by a space and a label for the search box if desired |
Sequence 1 | 24 |
Sequence 2 | 3 |
- In modify mode set Include=Yes.
- Change Sequence 2 if you need to change the order the search is displayed.
Configure the Title option (Advanced search) to be a keyword search
By default, the Title option in the Advanced search, searches on the first few words of the Title. You can change this so that Folio searches on keywords - for example in the Title, Subtitle and Alternative Title fields.
To do this, you enter a specific keyword index into the searchfields array setting.
For example:
- Keyword Index 2 indexes the title, subtitle and normalised title
- Keyword Index 3 indexes the author surname, forename, initials, corporate author, subordinate unit and composite name fields
Using OLIB Web, configure the Advanced search form to replace the second Folio search input field (which defaults to Title) with the keywords2 search:
- Go to OPAC> Configuration Settings.
- Use Configuration Settings by Config Block to search for Config Block: g_adv; Setting: searchfields:
604134 1 g_adv searchfields "keywords2 Keywords in Title" 23 2 Y
- Modify this g_adv setting containing Seq.2=2 (the one with "title Title" in the Value field).
- Set Value to "keywords2 Keywords in Title".
- Optionally, change Value 2 (hover text) and Value 3 (in-field text prompt) to something appropriate.
- Save your changes.
Changes take effect when you reload Folio. In the Advanced search, when the user enters their terms into Keywords in Title, Folio searches for them in the Title, Subtitle and Alternative Title fields.
Subject search
Titles by subject
By default Folio executes a Titles by Subject search when the user enters a Subject search. This is a list of titles linked to the subject heading that matches the search.
Subject headings search
If preferred you can change the Subject search to display the Subject Headings instead:
Edit the authority_file_search setting:
- Go to OPAC> Configuration Settings.
- Search for authority_file_search.
- Click to display the details and set Include=Yes.
Value should remain set to true for this to take effect.
Refresh Folio to implement the change.
Limit subject types
By default, Folio displays all subject headings, regardless of the Subject Type. If you would like to limit the subject headings to a specific Subject Type, you need to configure the pre_filt_subjtp setting. This setting determines which subject types are included in a subject authority file search. To configure pre_filt_subjtp:
- Go to OPAC> Configuration Settings.
- Search for pre_filt_subjtp.
- In Value, enter a semi-colon separated list of Subject Type key IDs, beginning and ending with a semi-colon e.g. ;SUBJ;BULL;. The subject authority file search will be limited to those subjects with one of the listed subject types.
- Set Include = Yes.
Note: if pre_filt_subj is not "included", or if it is included and Value is set to “;;”, all subjects will be included in the subject authority file search.
Display
The settings in the configuration block g_subject_hitlist specify what is included in the subjects hitlist:
Config Setting ID | Interface | Config Block | Setting | Value | Sequence 1 | Sequence 2 | Include? |
---|---|---|---|---|---|---|---|
606000 | 1 | g_subject_hitlist | s_hitlist | "subject" | 1 | 1 | Y |
606001 | 1 | g_subject_hitlist | s_hitlist | "titlecnt" | 1 | 2 | Y |
606002 | 1 | g_subject_hitlist | l_subject | "Subject" | 2 | 0 | Y |
606003 | 1 | g_subject_hitlist | l_numtitles | "Titles" | 3 | 0 | Y |
The s_hitlist array specifies which columns are displayed. Only two options are currently available for this array: subject and titlecnt.
The l_subject and l_numtitles settings specify the text to be used for these respective column headers. Open in modify mode to change the text.
All Titles search
The Title/Author search in Folio searches on
- all OLIB titles - main title, subtitle, alternative title, cross reference titles, uniform title, parent/contains titles
- all "Authors" of any Responsibility type or Author type
There are 2 settings in the config block gno_startup that configure the behaviour of the All Titles search:
search_all_titles |
"true" or "false" whether OLIB searches all title fields or just the main title. Note this includes the Series title, which may often not be relevant e.g. if a title record for Little Women is linked to the series Penguin Modern Classics, a title search for “penguin” would also include an item like Little Women in the hitlist. |
include_series_titles | Y/N whether the Series title is included in the All Titles search. |
By default, Folio has search_all_titles set to "true" and include_series_titles set to "N", therefore Folio title searches include all titles except for Series titles. Searching for "penguin" might give the search result:
Penguins of the world (2nd) 2007
Lynch, Wayne
Books
Copies: 1
If Series titles are included (include_series_titles = "Y", this could result in search results such as -
The Bostonians: a novel (2000)
James, Henry; Lansdown, Richard
Books
Copies: 2
Penguins of the world (2nd) 2007
Lynch, Wayne
Books
Copies: 1
A room with a view (2000)
Forster, E.M; Bradbury, Malcolm
Books
Copies: 5
Include series titles
- Go to OPAC> Configuration Settings.
- Search include_series_titles.
- Modify the record and set Value = "Y" (include Series titles) or "N" (exclude Series titles). Include double quotes.
- Check that the Include field is set to Yes.
Changes take effect when you next reload Folio.
Other keyword index searches
This configuration allows you to include search options in Folio that search one of the keyword indexes other than the Main Word Index.
To view these multiple indexes in OLIB Web, go to System Administration> Keyword Indexes.
To implement this:
- Create a new configuration block.
- Add several new configuration settings that belong to the new configuration block.
OLIB is supplied with a sample configuration block to help you with the configuration. It can be copied and modified accordingly:
- g_kws_tauth
Create new config block
Create a new config block with a name that matches g_kws_xxxx. "xxxx" can be any mnemonic, e.g. tauth to represent a search in the Title/Author index.
- Go to OPAC> OPAC Config Block.
- Click New Record.
- Enter details:
Config Block | g_kws_tauth2 |
---|---|
Description | Title/Author Keyword Index Search |
Create new configuration settings
The new settings below all belong in the new configuration block, e.g. g_kws_tauth.
Create each setting as follows:
- Go to OPAC> Configuration Settings.
- Click New Record.
- Enter details for each of the settings as shown in the examples below -
Create searchfields setting:
Add a searchfields setting to specify which search fields should be displayed when the search option is selected.
Value 1 is the actual search field and must be one of - title, name, keywords, subject, isbn, classmark, ctrl or note10. After a space you can add a label for the search box.
Value 2 is the hover text.
Config Block | g_kws_tauth |
---|---|
Setting | searchfields |
Description | A list of search fields, optional labels, hover text and in-field prompts for the search boxes |
Value | "keywords Words in Title or Author." |
Value 2 | "Some words from the title and author to describe the item you are looking for." |
Value 3 | "Enter one or more words and click Search (or hit Enter) to find records that include all the words you entered in the title and author fields" |
Allowable Values |
Value 1 is the search field. It must start with one of: title, name, keywords, subject, isbn, classmark, ctrl or note 10. This can then be followed by a space and a label for the search box if desired |
Sequence 1 | 2 |
Sequence 2 | 1 |
Create keyword search facets array:
Create kws_xxxx_facets settings with Values for, e.g. media type "mtp", publication date "pdate", location "loc". Here is an example for "mtp":
Config Block | g_kws_tauth |
---|---|
Setting | kws_tauth_facets |
Description | |
Value | "mtp" |
Allowable Values | A valid facet name. [In double quotes] |
Sequence 1 | 4 |
Sequence 2 | 1 |
Include? | Yes |
Create fb_sidebar_header
This displays some text at the top of the facets sidebar when the search option is selected, e.g:
- Refine your search by:-
Config Block | g_kws_tauth |
---|---|
Setting | fb_sidebar_header |
Description | The facet sidebar header label. |
Value | "Refine your search by:-" |
Allowable Values | A short piece of text. [In double quotes] |
Sequence 1 | 3 |
Sequence 2 | 0 |
Include? | Yes |
Create fb_header_mtp
Create fb_header_mtp settings to display some text at the top of the facet blocks, e.g:
- Format
- Publication
- Copy location
- Author
Config Block | g_kws_tauth |
---|---|
Setting | fb_header_mtp |
Description | |
Value | "Format" |
Allowable Values | Any text. [In double quotes] |
Sequence 1 | 5 |
Sequence 2 | 0 |
Include? | Yes |
Create a keyword_indexno setting
This is to represent the keyword index to be searched in Folio.
In the Value field add a number in double quotes. E.g. "4" is to search in OLIB's Keyword Index 4 (the title and author keyword index):
Config Block | g_kws_tauth |
---|---|
Setting | keyword_indexno |
Description | The keyword index number of the keyword search index that this search will search in. |
Value | "4" |
Allowable Values | A number between 2 and 9, surrounded by double quotes. |
Sequence 1 | 1 |
Sequence 2 | 0 |
Include? | Yes |
Create the new search in Folio's Search Options box:
Note that this is added to the g_searchmenu config block. To do this create a new smenu_options setting. Sequence 2 is where it will appear in relation to the other search options:
Config Block | g_searchmenu |
---|---|
Setting | smenu_options |
Description | Title/Auth Keyword. |
Value | "kws_tauth" |
Value 2 | "Title & Author Keyword" |
Allowable Values | |
Sequence 1 | 1 |
Sequence 2 | 9 |
Include? | Yes |
Pre-selected facets search
Optionally you can configure Folio to include search options on the Search Options menu that are pre-filtered. This is done by pre-selecting facets in the facets sidebar when the new search option is chosen.
Tip: there are other settings you may wish to add to control display of the search form and facet blocks. These are the same as the settings you would configure for a standard keyword search. See the g_kws_tauth example record above.
New settings take effect when you next reload Folio.