Coordinate Your Search Engines to Work Together

Access and Specify Settings for Multiple Search Engines

Procedure:

  1. Navigate to the SmartHub Admin page at: http(s)://[web-app-url]/_admin.
    • For example: http://localhost:1234/_admin.
  2. Go to the Federator Properties page.
  3. Left panel in the UI:
    • General Settings: Access the general SmartHub settings.
    • Security Settings: Secure your SmartHub.
      • Users (UPN account)
      • Groups (Dispay name) Security roles: Security toles enables admins to assign different security roles. These roles give non-admin users access to other features.
    • User Profile Settings: Configure your user profile/picture providers.
    • Additional Settings: Configure extra settings such as the cache expiration time.
    • Extensibility: Manage your search engines and Tuning stages.
  4. General Settings:
    • SmartHub Version: 6.x. Set by default.
    • Main Backend: The main search engine settings.
  5. Security Settings:
    • Authentication Mode: Specify the authentication type.

      Note: Every authentication mode comes with its own UI.
    • Admin Users: Specify users that are allowed to access the admin page.
    • Trusted App Redirect URLs: Specify the apps that are allowed to communicate with SmartHub.
  6. User Profile Settings:
    • User Profile Providers: Configure providers that fetch the user properties.
    • User Picture Providers: Configure providers that fetch the user pictures.
  7. Additional Settings:

Specify Results Ordering

Normalize Your Results

  • Normalize your results, or prioritize content sources, by specifying a mixing algorithm.

    • A mixing algorithm means the order in which the search results are displayed on the results page.

    • If you set the mixing algorithm to Rank based in the Administrator user interface, the SmartHub search results are shown in descending order.

  • While ranking scores apply only within the search engine, the mixing algorithm normalizes results across your search engines.

    • For example, a 1,000 point score from search engine A might not be equivalent to a 1,000 point score from search engine B.
    • The equivalent score on engine B might be 500, or 5,000.
    • The rank-based mixing algorithm ensures that when the results are merged, end users see their results sorted by decreasing relevancy (or your specified relevancy score).
  • An alternative to applying the mixing algorithm to search engines is to rank one content source over another.

    • For example, a regional farm using SmartHub might want to rank its local content over its corporate content.

    • Conversely, a global deployment might choose to rank headquarters content higher than its regional content.

  • To perform a ranking operation, modify the mixing algorithm values.

Customize Your Search Error Display

  1. Go to the General Settings page in the SmartHub administration portal.
  2. Error Handling: Click and the SmartHub pop-up window appears.
  3. Display mode:

    • Show first: Search errors appear at the top of the search results. Enabled by default.
    • Show last: Search errors appear at the bottom of the search results.
    • Don't show: Search errors are not displayed.
  4. Error icon: Select the .png icon that appears for errors.
  5. Warning icon: Select the .png icon that appears for warnings.
  6. Error Title template: Choose one or both of the following:
    • error level: %level%
    • error message: %message%
  7. Error Description Template: %description%
    • A description of the errors details.
  8. Click OK.

Specify the Query Syntax

  • The text can be added at the beginning or the end of the query.
    • If you add the text in more than one location, the query parses only one and considers the second location to be part of the query term.
  • Quotes (" ") are mandatory. If the quotes are not specified for the search engine list, the search engine list is ignored, and the query is passed as-is to the main search engine only.
  • The search engine list can also be specified in the query text box.
    • Simple cases are supported, but the full KQL syntax is not supported.
  • If the search engine list is not specified, or if this list is empty, the SmartHub acts as a pass through and queries only the main search engine.
  • If you specify a query against multiple search engines, each query must be separated by a semi-colon (;).
  • Search engine names are case-insensitive and must exist in the Total additional search engines in order to be queried against.
    • A warning is issued for search engines that are specified in this list, but are not Registered search engines.
  • If a search engine is specified more than once (either explicitly or as a result of * expansion), this search engine is queried only once.
  • You can use the asterisks character (*) to specify starts with behavior, as shown in the last three examples below:
  • FederatorBackends:"backend1,backend2": Queries against search engines named backend1 and backend2
    • FederatorBackends:"*": Queries all the search engines
    • FederatorBackends:"FirstBackend; s*": Queries the first search engine and all search engines that start with s
    • FederatorBackends:"back*": Queries all the search engines that start with the word "back"

Scriptable Mixing Capability

The mixing script is called at query time after the results are returned from all the search engines.

The script has access to:

  • PerBackendResults: List<SearchResults> 
    • The list of results returned by each search engine
    • To know which search engine a SearchResults object belongs to you can check SearchResults.BackendName
    • See SearchQuery class to find all the available properties
  • Query: SearchQuery
    • The SearchQuery object that was executed for the current search
    • You can use this object to read information about the search - see SearchQuery class to find all the properties available
  • MixingError: FederatorError
    • This allows you to return an error the engine so that it knows something went wrong at mixing time
    • To set an error:

      Sample Mixing error

      MixingError = new FederatorError(FederatorErrorLevel.Error, "Something went wrong")

    • The available Error levels are:

      • Error

      • Info

      • Warning

The script is expected to return:

  • List<SearchResult> that contains a number of results less or equal to Query.RowLimit (10 by default) which represents the list of results that should be displayed for the current search page.
    • If you return less than Query.RowLimit results, the Paging mechanism does not consider additional results to be returned after the current page.

Sample script that returns only the 1st result of each search engine:

Sample mixing script
var results = new List<SearchResult>();

foreach(var backendResults in PerBackendResults)
{
  if(backendResults.Count > 0)
      results.Add(backendResults[0]);
}

return results;