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.
Next revision | Previous revision | ||
videos:combining_search_types [2020/07/16 18:25] – created demiankatz | videos: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 | + | The ninth VuFind® |
Video is available as an [[https:// | Video is available as an [[https:// | ||
Line 11: | Line 11: | ||
===== Transcript ===== | ===== Transcript ===== | ||
- | // This is a raw machine-generated transcript; it will be cleaned | + | In last month' |
- | // Coming soon! // | + | 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. VuFind' |
+ | |||
+ | So here I am at the terminal in the VUFIND_HOME directory, and as with any other VuFind configuration, | ||
+ | |||
+ | So these comments at the top summarize everything, and once I get into the guts of the file, there' | ||
+ | |||
+ | 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.ini, | ||
+ | |||
+ | 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 example, if you had three columns and six types of searches, you could wave at 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' | ||
+ | |||
+ | But now onto 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 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 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 backend 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 executed and processed before the overall results page will load, which could be very slow, and will certainly be dragged down by whatever service runs the slowest. But if we use Ajax on some of the boxes, it will cause the mainstream 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 for the bibliographic and website indexes. Let's see how that looks. | ||
+ | |||
+ | You can get to your combined search screen by simply adding the word combined to your VuFind URL. And as I mentioned, as it's configured by default, the 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 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' | ||
+ | |||
+ | If we set this to true, it'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 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 name 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. 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 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 dropdown. 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 dropdown into labeled 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 VuFind. In this instance, when 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 example, we can perform a Google search directly from inside VuFind. Obviously, there' | ||
+ | |||
+ | 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' | ||
+ | |||
+ | 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 backend names to labels in order to turn on tabs in your search results. So I'm going to uncomment the Solr equals catalog option. I'm going to add combined equals combined and Solr web equals 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, | ||
+ | |||
+ | That is all I have for this month. But I thank you for your time and I will have more next time. Thanks again. | ||
+ | |||
+ | //This is an edited version of an automated transcript. Apologies for any errors.// | ||
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
videos/combining_search_types.1594923911.txt.gz · Last modified: 2020/07/16 18:25 by demiankatz