elevate.xml not working when search done in Drupal

Created on 18 August 2024, 8 months ago
Updated 19 August 2024, 8 months ago

Setup

  • Solr version: 8.11.2
  • Drupal Core version: 10.2.6
  • Search API version: 8.x-1.34
  • Search API Solr version: 4.3.3
  • Configured Solr Connector: Standard

Issue: elevate.xml not working when search done in Drupal

I have configured elevate.xml to bring up a document when I run a search for "example query" string and it works when I put that string to the q field in Solr Admin and hit Execute Query. So the Solr part seems right, except the logging: I configured Logging Level for QueryElevationComponent as "debug", but nothing appears in the log about elevation even when elevation works via Solr Admin. However, it doesn't work when I run the same search in Drupal: the document doesn't show up and in the log I am getting 0 hits. When I turn on debugQuery, the debug messages show that via Solr Admin I am getting the match from elevate.xml, but while searching via search_api_solr Drupal module I am getting none:

Solr Admin debug response:

"debug":{
    "queryBoosting":{
      "q":"example query",
      "match":["4ecgq5-aris_public_data-aris:aris_people/people_person_id/59473"]},
    "rawquerystring":"example query",

Search API Solr debug response:

      "debug":{

        "queryBoosting":{

      "q":"{!boost b=boost_document}  ((+(tm_X3b_en_people_aggregated_field:\"example\"^1 tm_X3b_und_people_aggregated_field:\"example\"^1 tm_X3b_en_people_location_modecode:\"example\"^1 tm_X3b_und_people_location_modecode:\"example\"^1 tm_X3b_en_people_title:\"example\"^5 tm_X3b_und_people_title:\"example\"^5) +(tm_X3b_en_people_aggregated_field:\"query\"^1 tm_X3b_und_people_aggregated_field:\"query\"^1 tm_X3b_en_people_location_modecode:\"query\"^1 tm_X3b_und_people_location_modecode:\"query\"^1 tm_X3b_en_people_title:\"query\"^5 tm_X3b_und_people_title:\"query\"^5)) tm_X3b_en_people_aggregated_field:(+\"example\" +\"query\")^1 tm_X3b_und_people_aggregated_field:(+\"example\" +\"query\")^1 tm_X3b_en_people_location_modecode:(+\"example\" +\"query\")^1 tm_X3b_und_people_location_modecode:(+\"example\" +\"query\")^1 tm_X3b_en_people_title:(+\"example\" +\"query\")^5 tm_X3b_und_people_title:(+\"example\" +\"query\")^5)",
          "match":null},

    "rawquerystring":"{!boost b=boost_document}  ((+(tm_X3b_en_people_aggregated_field:\"example\"^1 tm_X3b_und_people_aggregated_field:\"example\"^1 tm_X3b_en_people_location_modecode:\"example\"^1 tm_X3b_und_people_location_modecode:\"example\"^1 tm_X3b_en_people_title:\"example\"^5 tm_X3b_und_people_title:\"example\"^5) +(tm_X3b_en_people_aggregated_field:\"query\"^1 tm_X3b_und_people_aggregated_field:\"query\"^1 tm_X3b_en_people_location_modecode:\"query\"^1 tm_X3b_und_people_location_modecode:\"query\"^1 tm_X3b_en_people_title:\"query\"^5 tm_X3b_und_people_title:\"query\"^5)) tm_X3b_en_people_aggregated_field:(+\"example\" +\"query\")^1 tm_X3b_und_people_aggregated_field:(+\"example\" +\"query\")^1 tm_X3b_en_people_location_modecode:(+\"example\" +\"query\")^1 tm_X3b_und_people_location_modecode:(+\"example\" +\"query\")^1 tm_X3b_en_people_title:(+\"example\" +\"query\")^5 tm_X3b_und_people_title:(+\"example\" +\"query\")^5)",

I verified that the elevated document fits all the filters specified via fq, so filers are not a problem. I also added the line true to QueryElevationComponent config, but it did not have any effect.

Please help: how to make elevate.xml work with Drupal module search_api_solr ?

πŸ’¬ Support request
Status

Active

Version

4.3

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States calmforce

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @calmforce
  • πŸ‡©πŸ‡ͺGermany mkalkbrenner πŸ‡©πŸ‡ͺ

    Did you activate the elevator request handler for that server?

  • πŸ‡ΊπŸ‡ΈUnited States calmforce

    Yes, request_handler_elevate_default_7_0_0 handler is enabled on the Drupal page /solr_request_handler, I can see this line in the solr.log o.a.s.h.c.QueryElevationComponent Loading QueryElevation from: /var/solr/data/usda_ars_aris/conf/elevate.xml and I can see it works when I execute the query in Solr Admin, see the debug output in the issue writeup above and in the screenshot attached.

Production build 0.71.5 2024