Query Profiles

Query profiles let you consistently point your search application at a static endpoint, but give you the flexibility to change the actual query pipeline being used (and optionally, the collection and/or configuration parameters for the query pipeline).

For example, an e-commerce site might want to create a query pipeline to support a month-long promotion. After the query pipeline is configured, it can be easily enabled by changing the query profile in use by the front-end application to use the new pipeline.

To run a query through a query profile, use the REST API as described below. For CRUD operations, you can use either the REST API or the Fusion UI.

Rules Simulator query profile

The Rules Simulator allows product owners to experiment with rules and other query rewrites in the _query_rewrite_staging collection before deploying them to the _query_rewrite collection.

Each app has a _rules_simulator query profile, configured to use the _query_rewrite_staging collection for query rewrites instead of the _query_rewrite collection. This profile is created automatically whenever a new app is created.

Query profiles in the REST API

  • Query Profiles API (/query-profiles)

    Create, read, update, and delete query profiles.

  • Query API (/query)

    Run a query through a query profile by specifying the profile ID and appending the request with a Solr query string, as in /api/query/<id>?<solrQuery>.

Query profiles in the UI

Query profiles are configured at Querying > Query Profiles.

Query Profiles

How to create a new query profile
  1. In the Fusion workspace, navigate to Querying > Query Profiles.

  2. Click New.

    The Add Query Profile panel appears:

    Add Query Profile

  3. Enter an Query Profile ID.

  4. Select a query pipeline to associate with this profile.

  5. Enter a Solr search handler to use with this profile.

    The default of select is usually fine.

  6. Select a collection to associate with this profile.

  7. Optionally, click New params…​ to enter Solr request parameters to add to the request URL when submitting queries using this profile.

  8. Optionally, select Enable experimentation to configure this profile for use with experiments.

    1. Select the percentage of experiment traffic to direct to this profile.

    2. Select the experiment to associate with this profile, or select Add Experiment to configure a new one.

      See Set up an experiment for details.

  9. Click Save.

    The query profile window displays the request URL for sending queries to this profile.

How to delete a query profile
  1. In the Fusion workspace, navigate to Querying > Query Profiles.

  2. In the profiles list, select the query profile to delete.

  3. In the query profile configuration panel, click Delete profile.