I did some debugging and as far as I understand, the situation is:

- QueryElevationComponent works by modifying the original query, it adds a clause to it with a super high boost so that result comes on top
- in QueryElevationComponent.java:

  protected Elevation getElevation(ResponseBuilder rb) {
    SolrParams localParams = rb.getQparser().getLocalParams();
    String queryString =
localParams == null ? rb.getQueryString() : localParams.get(QueryParsing.V);
    if (queryString == null || rb.getQuery() == null) {
      return null;
    }
   ...//rest of the method

hybrid search expects "json.queries" syntax where more than one named query is sent at once:

{
"keyword_search":"{!edismax qf='question^5 answer^3' mm=1 v=someterms}",
  "semantic_search": "{!knn f=a_vector topK=25 v=somevector}"
}

using the json.queries syntax, in the above method, queryString is always null, therefore getElevation returns null as if no elevation is specified at all.

Seems like the problem is that older QueryElevationComponent doesn't take into account the newer query syntax, however, on the other hand, since there are multiple queries, how would the QEV know which one to add the boost?

--ufuk

Reply via email to