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

Next revision
Previous revision
Next revisionBoth sides next revision
videos:combining_search_types [2020/07/16 18:25] – created demiankatzvideos:combining_search_types [2020/08/07 13:30] – [Transcript] demiankatz
Line 11: Line 11:
 ===== Transcript ===== ===== Transcript =====
  
-// This is a raw machine-generated transcript; it will be cleaned up in the near future. //+// This is a raw machine-generated transcript; it will be cleaned up as time permits. //
  
-// Coming soon! //+ in last month's video we set up a web 
 +index um and so we now have a you find 
 +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 if you find 
 +includes several mechanisms for 
 +combining searches and these mechanisms 
 +can be used separately or in combination 
 +depending on your needs so in today'
 +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 
 +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 
 +approach where 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 
 +view fiims 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 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 
 +I 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'
 +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'
 +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 i 
 +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 
 +I 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 ----
 ---- ----
  
videos/combining_search_types.txt · Last modified: 2023/04/26 13:29 by crhallberg