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 ?