About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
videos:combining_search_types

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
videos:combining_search_types [2020/08/07 13:30] – [Transcript] demiankatzvideos:combining_search_types [2023/04/26 13:29] (current) crhallberg
Line 1: Line 1:
 ====== Video 9: Combining Search Types ====== ====== Video 9: Combining Search Types ======
  
-The ninth VuFind instructional video explains how to combine multiple types of searches, using the example of configuring side-by-side catalog and website search results.+The ninth VuFind® instructional video explains how to combine multiple types of searches, using the example of configuring side-by-side catalog and website search results.
  
 Video is available as an [[https://vufind.org/video/Combined_Search.mp4|mp4 download]] or through [[https://www.youtube.com/watch?v=sSP7rJjkYl8&feature=youtu.be|YouTube]]. Video is available as an [[https://vufind.org/video/Combined_Search.mp4|mp4 download]] or through [[https://www.youtube.com/watch?v=sSP7rJjkYl8&feature=youtu.be|YouTube]].
Line 11: Line 11:
 ===== Transcript ===== ===== Transcript =====
  
-// This is raw machine-generated transcript; it will be cleaned up as time permits//+In last month's video, we set up web index and so we now have a VuFind instance that has both a catalog of bibliographic records and an index of web pages, which brings up the challenge of how to allow users to search both of these things. Fortunately, VuFind includes several mechanisms for combining searches and these mechanisms can be used separately or in combination depending on your needs. So in today's video, I'm going to show you how to combine searches side by side, how to create combined options in the search options drop down here, and how to use tabs to switch between multiple sets of search results on the fly.
  
- in last month's video we set up a web +We'll start with combined searching. Obviously, one of the challenges of having many different types of resources to search is figuring out how to present them to your user. And many libraries have found that an effective way of combining different types of search results is the so-called bento box approachwhere a single set of search terms reveals a number of boxes of categorized content and then the user can navigate into whichever set of results are most appropriate for them. VuFind'combined searching mode provides a simple way of implementing this type of bento box searching. So I'm going to set that up first to allow us to search our web index and our bibliographic index side by side. 
-index um and so we now have a you find + 
-instance that has both a catalog of +So here I am at the terminal in the VUFIND_HOME directory, and as with any other VuFind configurationI'm going to start by copying the default configurationwhich is the config/vufind/combined.ini into my local/config/vufind directoryestablishing a local copy that I can edit. I will then edit that file. As with all of VuFind'configuration filescombined.ini has lots and lots of comments in it describing all of the contents of the file. There are a handful of reserved sections in herewhich allow you to set global settings for combined searchingand the remainder of the sections each define one search box that will show up in the combined results
-bibliographic records and an index of + 
-web pages which brings up the challenge +So these comments at the top summarize everything, and once I get into the guts of the filethere's a basic searches section which defines which search types the user can choose. So for exampleif you wanted to allow a fielded titleauthoror subject search across all of your search boxesyou could uncomment some of these options to make that possible. But it's important to keep in mind that when you're combining search resultsyou can only turn on options that are supported in all of the boxes. So for the purposes of combining web results and bibliographic resultshaving search types to select doesn't make any sense because the fields are very different. So I'm going to leave all of this commented out. But if I were in a different scenario where I wanted to search two different kinds of things that both had titlesI would have the option of turning on title searchingwhich would allow the users to do more focused searching in their results
-of how to allow users to search both of + 
-these things fortunately if you find +The home page section here allows you to turn on contents on the main home screen of combined searching. By defaultthat screen is just going to show a search box. But by using content block pluginswhich are described in more detail in searches.ini, you can add other content therebe it sort of a welcome message or details pulled in from other parts of you find. 
-includes several mechanisms for + 
-combining searches and these mechanisms +The layout section controls how the boxes in your combined search are distributed on the screen. You can set how many columns of boxes that you want to show and how you want to wait the distribution of search boxes across the columns. So for exampleif you had three columns and six types of searchesyou could wave at the left or to the right or you could evenly spread it across the columns. In the simple two column exampleI'm about to show you none of this will matter. We'll just get two boxes side by side. But in more complex setupsyou may find these advanced settings helpful for controlling the priority and arrangement of all of the search options. 
-can be used separately or in combination + 
-depending on your needs so in today'+Before I get into the boxes themselvesof which there are a few examples hereI wanted to go down to the very bottom and point out that there's also this recommendation module sectionwhich you can use to embed recommendations above or below all of the combined searches. So againmost of the time recommendation modules work best in the context of a particular type of searchbut there are some situations where you may want to augment the overall result screen and this setting allows you to do that. 
-video I'm going to show you how to + 
-combine searches side-by-side how to +But now onto the really juicy part of this filewhich are these sections defining search boxes. For each of thesethe section name within the configuration file is actually the name of one of you find search backendsthe code that actually retrieves search results. So any existing search backend can be embedded into combined searches by just creating a matching section name. So the example configuration includes sections for the summon and EDS services. Obviously, since we are not using those services in this examplewe want to comment those out. But we're going to leave the solar section in place because that's where our bibliographic records live. And we also want to add a solar web section for the website because solar web is the name of the backend that handles web results. 
-create combined options in the search + 
-options drop down here and how to use +Within the sectionwe need to provide a label which will be used to title the search results within the box. We could optionally include a sub labelwhich just provides some extra messaging within the box. If we set the more link that will provide a link from the combined search into the full result set for that box. And in theorywe can limit the number of results that show up. So by defaultwe get 10. But if we wanted to have more or fewerwe can adjust the limit here
-tabs to switch between multiple sets of + 
-search results on the fly +Another optional setting is the Ajax settingwhich if we set to true will cause these search results to be retrieved asynchronously from the rest of the page. And Ajax loading of combined results can be really helpfulparticularly when you have a large number of boxes. Or if some of your boxes are being loaded from slow third party services. Because if we don't use Ajaxall of the searches have to be executed and processed before the overall results page will loadwhich could be very slowand will certainly be dragged down by whatever service runs the slowest. But if we use Ajax on some of the boxesit will cause the mainstream to pop in fairly quickly and then additional results to load in as they become available. 
-we'll start with combined searching + 
-obviously one of the challenges of +So I've now set up the basic combined search settings for the bibliographic and website indexes. Let's see how that looks. 
-having many different types of resources + 
-to search is figuring out how to present +You can get to your combined search screen by simply adding the word combined to your VuFind URL. And as I mentionedas it'configured by defaultthe homepage of the combined search is just a search box. But you can augment this by turning on content block settings in combined.ini. So let's search for web and see what the combined search results look like. As you can seewe've got two boxes of results on the left. We have catalog results. And on the rightwe have website resultsI'm also going to refresh the page one more time and draw your attention to the website area here just to highlight how that Ajax loading works. So as you can seethere is a link of the word loading here before the full results actually popped into place. So if you're using combined searchit is common that you would want this to be the first thing that users encounter when they come to your site because it offers the broadest view into your content. Right nowbecause I haven't changed default configurationsif I go back to the homepage of you find the default defined URLI end up back in the bibliographic record search. But if I want to change thatit's very easyI just need to edit my local/config/vufind/config.ini file. And there's a setting in here called default modulewhich defines the name of a controller that will be loaded by default from the defined homepage. This defaults to searchwhich searches the bibliographic index. But if I simply change this setting from search to combineand then refresh my homepage herenow my default defined URL is taking me to the combined search. And you can use this for really anything you want to change to make your default defined behavior. So for exampleif I wanted my website search to be the defaultI could have changed that to webetc. So it's great that we can now search these two different services at the same time. But our search experience can now become a little bit confusing unless we do some additional configuration. So you'll notice on this screenmy search box up here searches the combined search. But if I hit this more options link here and delve into the bibliographic record searchnow I have the bibliographic record search boxI have no obvious way to get back to my combined search. And so I've changed contextbut within an area of the screen that looks like it should remain consistent. Similarly, if I delve into the web resultsI now have an identical looking search box to what I had on the combined screen. But if I search hereI'm searching the web resultsand I have to hit the back button to return to my combined searches. Obviously, this is going to cause people to get lost in your site. But fortunatelythere's a simple solutionwhich is the combined search box. Once againthere is simply a configuration file that controls the way do you find search box works. And we can manage that in the usual way. We'll copy the default version config/vufind/searchbox.ini into our local/config/vufind directory and we will edit that. Once againwe are faced with a file full of configuration settings and comments. But the thing that I want to mainly draw your attention to is this top setting combined handlerswhich defaults to false
-them to your user and many libraries + 
-have found that an effective way of +If we set this to trueit's going to create a uniform search box that works the same everywhere in the VuFind site and encompasses all of the options from all of the different search backends. So we need to turn that on and then scroll down to the combined handlers section. Here, we need to activate all of the search backends that we want to show options for in our search dropdown. So the example configuration here shows Solr and Summon results. But we want Solr and website results. So I'm going to change the Summon example to Solr web with a label of website. So you'll notice that the way these settings are set upyou have groups of typetargetlabeland group. It's very important that you copy all four settings when you add options here so that each of these name settings typetargetlabeland group have the same number of values because otherwise the settings can get out of sync and cause weird results. So when you're adding thingsjust be sure you copy everything and fill in all of the settings. And I'm going to do just that because I need to add one more set of options here because we want to include the combined search option in addition to the individual catalog and website options.  
-combining different types of search + 
-results is the so-called bento box +So a couple more things to clarify here. There are two values that we can put in the type for each of these groups of handler settings. VuFind means we're working with an internal VuFind search back end and that we need to get all of our options from VuFind some internal code. And that's the most commonly used setting. So in that casethe target value is the name of a search back end. And the label is what we want to display as a label for that option within the dropdown. The group setting is optional. If you leave it falsenothing will happen. But if you have a very large number of handlers in play and you want to group them within the dropdown into labeled groupsyou can provide a label here. But I recommend leaving that false in all but rare situations. The other type of handler you can set up is an external handler. Which allows you to actually link into searches on sites outside of VuFind. In this instancewhen a user performs a search, VuFind will just take the URL you provide as the target of the external resource and append their search terms to the end of that. So in this examplewe can perform a Google search directly from inside VuFind. Obviously, there's not really a good reason why you would want to do that most of the time. But if you're integrating VuFind with other local systems and you want to make them searchablethis is one way to achieve that kind of linking. Some other settings in this file that might potentially be of interest are include alpha browsewhich allows you to embed links to VuFind alphabetical browse search within the main search box. That's a topic we haven't covered yetbut we may in the future. And then the remaining settings have to do with grouping options together and are usually safe to ignore. In any casenow that I've turned all of this onif refresh my combined searchyou'll now see that I have a dropdown menu. 
-approach where a single set of search + 
-terms reveals a number of boxes of +So here is my combined search. Here is my catalog search. And under the catalog search are all of the catalog specific search options that are provided through VuFind'internal configurationthe options from searches.ini. Then we have the website. And then at the bottomthat Google example. And as you can seeit's under a label called other sites because of the group setting. So if I wanted to group all of these things here under a label that looked like thiscould use the group setting to accomplish that. But importantlywe now have consistent search behavior. If I click on more options on my catalog searchit now shows that I'm doing a catalog searchI have a consistent set of controls. If I go back and I click into my web resultagainnow it shows that I'm doing a website searchbut all of the same options are available everywhere. So I strongly recommend configuring a combined search box at the same time that you set up a combined search. And then there is just one last detail which is optional but usefulwhich is turning on search tabswhich just provides another way for users to navigate between different types of search results.  
-categorized content and then the user + 
-can navigate into whichever set of +I'll go back to my terminal and I will once again edit my main config.ini file. In this filethere is a section called search tabswhich by default is all commented out. But you can here create mappings from search backend names to labels in order to turn on tabs in your search results. So I'm going to uncomment the Solr equals catalog optionI'm going to add combined equals combined and Solr web equals website so that it's possible to tab between all three search optionsthe combined and the two individual. So just by adding those three lines of configurationif I now go back to my search results and refresh them, I now have tabs on my search box. And if I click on themthey will switch me back and forth between the three different search modes pertaining my search terms. So with all three of these things in placewe have access to every kind of search from every page of VuFind through this drop down menu here. Once we perform a searchwe can navigate to different kinds of searches with a single click through the tabs. And by configuring the combined searchwe have this high level view of all of our search results from multiple locations on a single screen. Utilizing all of these things togetherwe offer our users very flexible access to the content that we're providing. It can of course get a lot more complicated as you add a lot more contentfiguring out how to label your boxes and what kinds of messaging to use can be quite a challenge. But at least you find provides the technical framework to easily experiment with different arrangements and different labels and make all of your stuff visible 
-results are most appropriate for them + 
-view fiims combined searching mode +That is all I have for this month. But I thank you for your time and I will have more next time. Thanks again
-provides a simple way of implementing + 
-this type of bento box searching so I'm +//This is an edited version of an automated transcript. Apologies for any errors.//
-going to set that up first to allow us +
-to search our Web index and our +
-bibliographic index side-by-side so here +
-I am at the terminal in the view finder +
-Ector II and as with any other defined +
-configuration I'm going to start by +
-copying the default configuration which +
-is the 'big view find / combined I and +
-into my local config you find +
-directory establishing a local copy that +
-I can edit and then edit that file as +
-all you find configuration files +
-combined ini has lots and lots of +
-comments in it describing all of the +
-contents of the file there are a handful +
-of reserved sections in here which allow +
-you to set global settings for combined +
-searching and the remainder of the +
-sections each define one search box that +
-will show up in the combined results so +
-these comments at the top summarize +
-everything once I get into the guts of +
-the file there's a basic searches +
-section which defines which search types +
-the user can choose so for example if +
-you wanted to allow a fielded title +
-author or subject search across all of +
-your search boxes you could uncomment +
-some of these options to make that +
-possible but it's important to keep in +
-mind that when you're combining search +
-results you can only turn on options +
-that are supported in all of the boxes +
-so for the purposes of combining web +
-results and bibliographic results having +
-search types to select doesn't make any +
-sense because the fields are very +
-different so I'm going to leave all of +
-this commented out but if I were in a +
-different scenario where I wanted to +
-search two different kinds of things +
-that both have titles I would have the +
-option of turning on title searching +
-which would allow the users to do more +
-focus searching in their results on the +
-home page section here allows you to +
-turn on contents on the main home screen +
-of combined searching by default that +
-screen is just going to show a search +
-box but by using content block plugins +
-which are described in more detail in +
-searches I and I you can add other +
-content there be it sort of a welcome +
-message or details pulled in from other +
-parts of you find +
-the layout section controls how the +
-boxes in your combined search are +
-distributed on the screen you can set +
-how many columns of boxes that you want +
-to show and how you want to weight the +
-distribution of search boxes across the +
-columns so for example if you had three +
-columns and six types of searches you +
-could weigh that the left or to the +
-right or you could evenly spread it +
-across the columns in the simple two +
-column example I'm about to show you +
-none of this will matter we'll just get +
-two boxes side by side but in more +
-complex setups you may find these +
-Advanced Settings helpful for +
-controlling the priority and arrangement +
-of all of the search options before I +
-get into the boxes themselves of which +
-there are a few examples here I wanted +
-to go down to the very bottom and point +
-out that there's also this +
-recommendation module section which you +
-can use to embed recommendations above +
-or below all of the combined searches so +
-again most of the time recommendation +
-modules work best in the context of a +
-particular type of search but there are +
-some situations where you may want to +
-augment the overall result screen and +
-this setting allows you to do that but +
-now on to the the really juicy part of +
-this file which are these sections +
-defining search boxes +
-for each of these the section name +
-within the configuration file is +
-actually the name of one of you find +
-search backends the code that actually +
-retrieves search results so any existing +
-search back-end can be embedded into +
-combined searches by just creating a +
-matching section name so the example +
-configuration includes sections for the +
-summon and EDS services obviously since +
-we are not using those services in this +
-example we want to comment those out but +
-we're going to leave the solar section +
-in place because that's where our +
-bibliographic records live and we also +
-want to add a solar web section for the +
-website because Solar web is the name of +
-the back-end that handles web results +
-within the section we need to provide a +
-label which will be used to title the +
-search results within the box we could +
-optionally include a sub-label which +
-just provides some extra messaging +
-within the box if we set the more link +
-that will provide a link from the +
-combined search into the full result set +
-for that box and in theory we can limit +
-the number of results that show up so by +
-default we get 10 but if we wanted to +
-have more or fewer we can adjust the +
-limit here another optional setting is +
-the Ajax setting which if we set to true +
-will cause these search results to be +
-retrieved asynchronously from the rest +
-of the page and Ajax loading of combined +
-results can be really helpful +
-particularly when you have a large +
-number of boxes or if some of your boxes +
-are being loaded from slow third-party +
-services because if we don't use Ajax +
-all of the searches have to be exit +
-in processed before the overall results +
-page will load which could be very slow +
-and we'll certainly be dragged down by +
-whatever service runs the slowest but if +
-we use Ajax on some of the boxes it will +
-cause the main screen to pop in fairly +
-quickly and then additional results to +
-load in as they become available +
-so I've now set up the basic combined +
-search settings or the bibliographic and +
-website indexes let's see how that looks +
-you can get to your combined search +
-screen by simply adding the word +
-combines to your you find URL and as I +
-mentioned as its configured by default +
-the home page of the combined search is +
-just a search box but you can augment +
-this by turning on content block +
-settings in combine ini so let's search +
-for web and see what the combined search +
-results look like as you can see we've +
-got two boxes of results on the Left we +
-have catalog results and on the right we +
-have website results I'm also going to +
-refresh the page one more time and draw +
-your attention to the website area here +
-just to highlight how that Ajax loading +
-works so as you can see there is a link +
-of the word loading here before the full +
-results actually popped into place so if +
-you're using combined search it is +
-common that you would want this to be +
-the first thing that users encounter +
-when they come to your site because it +
-offers the broadest view into your +
-content right now because I haven't +
-changed default configurations if I go +
-back to the home page of you find the +
-default view by URL I end up back in the +
-bibliographic record search but if I +
-want to change that it's very easy +
-I just need to edit my local config you +
-find a big dot ini file and there's a +
-setting in here called default module +
-which defines the name of a controller +
-that will be loaded by default from the +
-defined home page this defaults to +
-search which searches the bibliographic +
-index but if I simply change this +
-setting from search to combine and then +
-refresh my home page here now my default +
-you find URL is taking me to the +
-combined search and you can use this for +
-really anything you want to change to +
-make your default you find behavior so +
-for example if I wanted my website +
-search to be the default I could have +
-changed that to web etc so it's great +
-that we can now search these two +
-different services at the same time but +
-our search experience can now become a +
-little bit confusing unless we do some +
-additional configuration so you'll +
-notice on this screen my search box up +
-here uh searches the combined search but +
-if I hit this more options link here and +
-delve into the bibliographic record +
-search now I have the bibliographic +
-record search box +
-I have no obvious way to get back to my +
-combined search and so I've changed +
-context but within an area of the screen +
-that looks like it should remain +
-consistent similarly if I delve into the +
-web results I now have an identical +
-looking search box to what I had on the +
-combined screen but if I search here I'm +
-searching the web results and I have to +
-hit the back button to return to my +
-combine searches obviously this is going +
-to cause people to get lost in your site +
-but fortunately there's a simple +
-solution which is the combined search +
-box once again there is simply a +
-configuration file that controls the way +
-if you find search box works and you can +
-manage that in the usual way we'll copy +
-the default version config / beautifying +
-search box +
-ini into our local config design +
-directory and we'll edit that once again +
-we are faced with a file full of +
-configuration settings and comments but +
-the thing that I want to mainly draw +
-your attention to is this top setting +
-combined handlers which defaults to +
-false if we set this to true it's going +
-to create a uniform search box that +
-works the same everywhere in the view +
-hindsight and encompasses all of the +
-options from all of the different search +
-backends so we need to turn that on and +
-then scroll down to the combined +
-handlers section here we need to +
-activate all of the search backends that +
-we want to show options for in our +
-search drop-down so the example +
-configuration here shows solar and +
-summon results but we want solar and +
-website results so I'm going to change +
-the summon example to solar web with a +
-label of website so you'll notice that +
-the way these settings are set up you +
-have groups of type target label and +
-group it's very important that you copy +
-all four settings when you add options +
-here so that each of these named +
-settings type target label and group +
-have the same number of values because +
-otherwise the settings can get +
-out of sync and cause weird results so +
-when you're adding things just be sure +
-you copy everything and fill in all of +
-the settings and I'm going to do just +
-that because I need to add one more set +
-of options here because we want to +
-include the combined search option in +
-addition to the individual catalog and +
-website options so a couple more things +
-to clarify here there are two values +
-that we can put in the type for each of +
-these groups of handler settings view +
-fine means we're working with an +
-internal view fine search back end and +
-that we need to get all of our options +
-from you finds internal code and that's +
-the most commonly used setting so in +
-that case the target value is the name +
-of a search back-end and the label is +
-what we want to display as a label for +
-that option within the drop down the +
-group setting is optional if you leave +
-it false nothing will happen but if you +
-have a very large number of handlers in +
-play and you want to group them within +
-the drop down into labelled groups you +
-can provide a label here but I recommend +
-leaving that false in all but rare +
-situations the other type of handler you +
-can set up is an external handler which +
-allows you to actually link into +
-searches on sites outside of you find in +
-this instance when a user performs a +
-search you find we'll just take the URL +
-you provide as the target of the +
-external resource and append their +
-search terms to the end of that so in +
-this example we can perform a Google +
-search directly from inside view fine +
-obviously there's not really a good +
-reason why you would want to do that +
-most of the time but if you're +
-integrating view find with other local +
-systems and you want to make them +
-searchable this is one way to achieve +
-that that kind of linking +
-some other settings in this file that +
-might potentially be of interest are +
-include alpha browse which allows you to +
-embed links to you finds alphabetical +
-browse search within the main search box +
-that's a topic we haven't covered yet +
-but we may in the future and then the +
-remaining settings have to do with +
-grouping options together and are +
-usually safe to ignore in any case now +
-that I've turned all of this on if +
-refresh my combined search you'll now +
-see that I have a drop down menu so here +
-is my combined search here is my catalog +
-search and under the catalog search are +
-all of the catalog specific search +
-options that are provided through view +
-fines internal configuration you know +
-the options from searches I and I then +
-we have the website and then at the +
-bottom that Google example and as you +
-can see it's under a label called other +
-sites because of the group setting so if +
-I wanted to group all of these things +
-here under a label that looked like this +
-can use the group setting to +
-accomplish that but importantly we now +
-have consistent search behavior if I +
-click on more options on my catalog +
-search it now shows that I'm doing a +
-catalog search I have a consistent set +
-of controls if I go back and I click +
-into my web result again now it shows +
-that I'm doing a website search but all +
-of the same options are available +
-everywhere so I strongly recommend +
-configuring a combined search box at the +
-same time that you set up a combined +
-search and then there is just one last +
-detail which is optional than useful +
-which is turning on search tabs which +
-just provides another way for users to +
-navigate between different types of +
-search results I'll go back to my +
-terminal and I will once again edit my +
-main config.ini file +
-in this file there is a section called +
-search tabs which by default is all +
-commented out but you can here create +
-mappings from search back-end names to +
-labels in order to turn on tabs in your +
-search results so I'm going to uncomment +
-the solar equals catalog option I'm +
-going to add combined equals combined +
-and solar web website so that it's +
-possible to tab between all three search +
-options the combined and the two +
-individual so just by adding those three +
-lines of configuration if I now go back +
-to my search results refresh though I +
-now have tabs on my search box and if I +
-click on them they will switch me back +
-and forth between the three different +
-search modes retaining my search terms +
-so with all three of these things in +
-place we have access to every kind of +
-search from every page of you find +
-through this drop-down menu here once we +
-perform a search we can navigate to +
-different kinds of searches with a +
-single click through the tabs and by +
-configuring the combined search we have +
-this high-level view of all of our +
-search results for multiple locations on +
-a single screen utilizing all of these +
-things together we offer our users very +
-flexible access to the content that +
-we're providing it can of course get a +
-lot more complicated as you add a lot +
-more content figuring out how to label +
-your boxes and what kinds of messaging +
-to use can be quite a challenge but at +
-least few find provides the technical +
-framework to easily experiment with +
-different arrangements and different +
-labels and make all of your stuff +
-visible +
-that is all I have for this month but I +
-thank you for your time and I will have +
-more next time thanks again +
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
videos/combining_search_types.1596807026.txt.gz · Last modified: 2020/08/07 13:30 by demiankatz