Closed (fixed)
Project:
Search API Federated Solr
Version:
8.x-3.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2020 at 21:26 UTC
Updated:
1 May 2020 at 08:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rpc5102 commentedComment #3
agentrickardWe haven't tested with Solr 8, just Solr 7. This is likely a Solr schema issue rather than a Drupal configuration issue.
What did you use for the schema? Search API Solr 8.x-3.8+ forces you to export and upload schema files, which must be edited. We had better luck using the schema files from 7.x. See the notes at https://github.com/palantirnet/search_api_federated_solr/blob/8.x-3.x/RE...
You may also need to add the following to settings.php:
See https://github.com/palantirnet/search_api_federated_solr/blob/8.x-3.x/RE...
Comment #4
rpc5102 commentedThanks for the quick reply! My guess is that you are correct about the schema issue. I have tried the default config.zip (with edits) that is generated by the Search API Solr module as well as the 7.x config in the federated-search-demo.
My settings.php contains:
$config['search_api_federated_solr.search_app.settings']['index']['query_field'] = ['rendered_item', 'full_text_title'];I've attached a debug response for the query *:* in debug-search-response.json_.txt if that helps. This is a fresh install so I can always downgrade to Solr-7 if recommended.
Note: There's a new full_text_title field in addition to the federated_title field since first posting.
Comment #5
agentrickardYeah, the Hungarian notation on field names that the 8.x version makes creates challenges.
tm_X3b_en_rendered_itemis the issue.It may be that you need to use:
$config['search_api_federated_solr.search_app.settings']['index']['query_field'] = ['tm_X3b_en_rendered_item', 'tcngramm_X3b_en_full_text_title'];That also assumes that you are using the search proxy. If you do not use the proxy, you have to edit the schema directly.
If might also just be
tm_rendered_item, which is what we use in the D7 version.What you are looking for is the
dfvalues being sent by the query.Comment #6
agentrickardI should also point out that you have multilingual fields, which we have done zero testing on.
Comment #7
rpc5102 commentedThat did it! Bypassing the proxy seemed to work as well but I would prefer to proxy. With the multilingual fields I noticed that the language was being interpreted as undefined in the query but setting it in the config fixed it.
Thank you for the help! Very excited to get this working.
Comment #8
agentrickardCan you document what you set in the config for language?
Are you able to search both languages at the same time? Or one at a time?
Comment #9
rpc5102 commentedTried various combinations but it looks like it's only pulling English.
The config that worked for my use case was:
$config['search_api_federated_solr.search_app.settings']['index']['query_field'] = ['tm_X3b_en_rendered_item', 'tcngramm_X3b_en_full_text_title'];Just having
rendered_itemandfull_text_titledefinitely did not work though. I am testing this on a different site that is not multilingual and same results. Umami was just an easy example to go with.Comment #10
rpc5102 commentedComment #11
agentrickardYou could probably set that field conditionally based on language....