Performing editorial correction on boosting

There are some cases in which it can be useful to give more visibility to certain documents in particular: for example, because they are indicated as more relevant, or because we want to do some reranking of results, thus boosting the more popular documents by using the search logs, or, again, to append at the end document which refer to terms and words that seems not to be very pertinent in general to our searches, even if they are precise in terms of full-text search. This kind of "revised results" should be done in a team with some expert on the domain data, who can possibly help us in deciding how much a process will fit the problem.

We can easily introduce an editorial correction by adding the following simple configuration into Solr:

<searchComponent name="elevator" class="org.apache.solr.handler.component.QueryElevationComponent">
  <str name="queryFieldType">string</str>
  <str name="config-file">elevate.xml</str>
</searchComponent>

<requestHandler name="/elevate" class="solr.SearchHandler">
  <arr name="last-components">
    <str>elevator</str>
  </arr>
</requestHandler>

As you can see, we are basically defining a new, independent searchComponent, and we will "plug" it into a specific requestHandler chain, just to avoid using the default one. The search component makes use of an external simple XML file in which we will define what document should be added or removed from the results, similar to the following code, which you can easily expand:

<elevate>
  <query text="dali">
    <doc id="http://en.wikipedia.org/wiki/Metamorphosis_of_Narcissus" />
  </query>
  <query text="leonardo">
    <doc id="http://en.wikipedia.org/wiki/Lisa_del_Giocondo" exclude="true" />
  </query>
</elevate>

In this simple example, we want a specific painting (narcissus by dali) to be "promoted" to the top of the result, while for the second example, we want to give lesser visibility to a specific painting (another portrait of the same subject of Mona Lisa, but for some reason we would not have it in the first result). We have searched using the term leonardo.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.76.237