Relevancy Model

How to configure Solr endpoint in Studio?

First step in using relevancy workbench is to configuring our Solr endpoint in studio. These configurations will help us building correct relevancy model and publishing it to desired Solr instance where we want to use this model. At runtime Solr will call relevancy service and will get appropriate relevancy model which is applicable for given query. Below are the steps using which you can create new search service.

To create new search service you need to provide following fields

Name - Name you want to give to your search service.

SolrCloud – If you are using SolrCloud then you need to enable this. If you are using standalone Solr instance then you can skip this setting.

ZkHost – If you are using SolrCloud then you need to provide zookeeper host ZkHost details here. You need to provide them in Host:Port format.Multiple Host:Port entries needs to be separated by comma.

Host – In case of standalone Solr you need to provide host and port details here.

Collection – Select collection for which you want to create relevancy model.

Handler – Select search handler where you have configured relevancy plugin. Steps to configure relevancy plugin are mentioned below.

Description – Description for your service.

ID Field- Speicify ID field of your collection.

Default – Enabling this will mark current search service as default for all users.

Once new service is created you will see that in the search service list. You can switch to any search service by selecting it from the list.

How to configure 3RDi relevancy plugin in Solr?

  1. Copy relevancy-plugin-*.jar your Solr lib directory of a collection for which you want to create relevancy model.
  2. Add component definition in solrconfig.xml like below,
  3.                 <searchComponent name="relevancy-component" class="com.tdg.solr.handler.component.RelevanceRulesComponent">
                    <!-- Relevancy Service URL to get applicable relevancy models -->    
                    <str name="relevance.profile.resturl">http://10.10.1.186:9082/relevance-workbench-rest/config/profile</str>
                    <!-- Default query parameter -->
                    <str name="search.query.param">q</str>
                    </searchComponent>
    			
  4. Add relevancy component in search handler
  5.             <arr name="components">
                      <str>relevancy-component</str>
                      <str>query</str>
                      <str>facet</str>
                      <str>highlight</str>
                      <str>elevator</str>
                      <str>debug</str>
                </arr>            
                

What is a Relevancy Model?

Relevancy Model is a collection of Relevancy Rules that are grouped together based on the user's requirement. Every user has a Global Relevancy Model that is set as a system-wide Model. Besides this, the user can create as many Models as needed. A Relevancy Model will always be in any one of the three states:

  1. Draft
  2. Benchmark
  3. Publish

There can be multiple globally published models and multiple locally published models, but only one Relevancy Model can be marked as the default model. When another model is set to the default stage, the previous default model will be unmarked.

How to create a Relevancy Model?

The user can create a new Relevancy Model in three different ways.

  1. Create New Model –
  2. On the left side of the screen, you will find the Relevancy Drawer, At the top of the drawer, you will have the option to create a Relevancy Model. You will need to provide a name and a description for the Model you are about to create.

  3. Import Model –
  4. The user can import relevancy model of the same Solr schema. The user has an option to download a model from one environment and import it to another environment.

  5. Copy Model –
  6. The user can copy an existing model and start working on it from that point. To do this, the user needs to click on the copy icon on the Relevancy Model, as shown below.

What is benchmarking and how do I benchmark my Relevancy Model?

To benchmark a Relevancy Model is to run the relevance rules of that Relevancy Model against a list of search queries that have been pre-configured in the Benchmarking Module. Benchmarking a Model will produce a set of metrics that can be used by the user to gauge how well this Relevancy Model stacks up against the rest.

In order to benchmark a Model, you can click on the Benchmark button which is located at the top-right hand-side, as shown below. This can be an expensive process depending on the number of test queries set in the Benchmarking Module.

What is publishing a Relevancy Model and how do I publish my Model?

At any given point of time, there can be at most two Published Relevancy Models - locally published Relevancy Model and globally published Relevancy Model. The Locally Published Model overrides the rules of Global Published Model. When user does not have The Locally Published Relevancy Model, rules of the Globally Published Relevancy Model will be used while searching.

Publishing a Relevancy Model(from Benchmarked stage) promotes the Model to the locally "Published" stage and set's it as the user's default Relevancy Model while replacing any previous locally published Model and over-riding the Global Published Relevancy Model. This means, all relevance rules set as active within that Model will now be used when the user does a search.

Note: Once a Relevancy Model is published it cannot be edited further.

How do I publish my Relevancy Model locally?

To publish a Model, it first has to be in the benchmarked stage. Once in the benchmarked stage, you will find a Publish button in the same place as you had found the Benchmark button, as shown below.

Note: Local Publish button will appear only if you click over a Benchmarked Relevancy Model.

Can I globally publish my Relevancy Model?

Yes, you can! Since a Global Model will be applicable for all user (in case they don't have Local Published Model), a Relevancy Model has to be tested well before publishing it globally. Hence a Model which is already published locally can be only promoted to Global Published Relevancy Model. You will find the Global Published button in the same place as you have found Benchmark and Local Published button, as shown below.

Note: Global Publish button will appear only if you click over a Local Publish Relevancy Model.

Can I copy an already existing Relevancy Model and make edits to it?

Sure, copying a Relevancy Model and using it as the base for your new Model is a good way to start. Right next to each Model, we provide a control that will let you copy the Model, as shown below. You will need to provide a new name and description for your new Relevancy Model.

Can I delete the Relevancy Model ?

Yes, you can delete any Relevancy Model except the Global Published Relevancy Model. You can find the Delete button on the top right corner.

Where can I find additional/summary data about my Relevancy Model?

At any point, if you want to find out more information about your Relevancy Model, you can click on the name of the Model in the Relevancy Drawer, This will bring you to the screen that will give you data about your Relevancy Model. Examples of additional data you can find are given below: