I face a problem when using QueryElevation. I want to split the elevation file into several files, and be able to manage differently according to different domain (I have several domains to manage). Each domain belongs to the same application. How could I manage each elevation file differently?
+1
A:
I don't think you can do that out of the box. What you could do (it would be somewhat cumbersome, though) is declare one instance of QueryElevationComponent per domain (with its corresponding config file) and then map it to a domain-specific requestHandler, e.g.:
<searchComponent name="elevatorExample" class="org.apache.solr.handler.component.QueryElevationComponent">
<str name="queryFieldType">string</str>
<str name="config-file">elevateExample.xml</str>
</searchComponent>
<requestHandler name="/elevateExample" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
</lst>
<arr name="last-components">
<str>elevatorExample</str>
</arr>
</requestHandler>
<searchComponent name="elevatorAnotherDomain" class="org.apache.solr.handler.component.QueryElevationComponent">
<str name="queryFieldType">string</str>
<str name="config-file">elevateAnotherDomain.xml</str>
</searchComponent>
<requestHandler name="/elevateAnotherDomain" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
</lst>
<arr name="last-components">
<str>elevatorAnotherDomain</str>
</arr>
</requestHandler>
Another possibility is to mess with the source code to make the config file dynamic.
Mauricio Scheffer
2010-08-24 04:17:23
+1 It makes sense
Pascal Dimassimo
2010-08-24 18:57:21
Maybe that's the only solution for solr 1.4.
Chamnap
2010-09-01 16:49:12