Apologies if this is obvious but I cannot seem to get the 'Rendered Item' field to render (or influence searches) on the Drupal Umami Demo. Tried a number of different view modes and processor settings. Any suggestions? Screenshots attached.

Versions

Drupal 8.8.5
Solr 8.5.0
Search API 8.x-1.16
Search API Solr 8.x-3.9
Search API Federated Solr 8.x-3.0

View mode for

Content » Article Default
Content » Basic Page Default
Content » Recipe Default

Processors

HTML filter Enabled

Comments

rpc5102 created an issue. See original summary.

rpc5102’s picture

Issue summary: View changes
agentrickard’s picture

We 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:

$config['search_api_federated_solr.search_app.settings']['index']['query_field'] = ['rendered_item', 'federated_title'];

See https://github.com/palantirnet/search_api_federated_solr/blob/8.x-3.x/RE...

rpc5102’s picture

StatusFileSize
new167.48 KB

Thanks 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.

agentrickard’s picture

Yeah, the Hungarian notation on field names that the 8.x version makes creates challenges. tm_X3b_en_rendered_item is 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 df values being sent by the query.

agentrickard’s picture

I should also point out that you have multilingual fields, which we have done zero testing on.

rpc5102’s picture

That 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.

debug: {
  parsedquery: {
    "+DisjunctionMaxQuery((tcngramm_X3b_und_full_text_title:mint | tm_X3b_und_rendered_item:mint))"
  }
}

Thank you for the help! Very excited to get this working.

agentrickard’s picture

Can 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?

rpc5102’s picture

Tried 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_item and full_text_title definitely 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.

rpc5102’s picture

Status: Active » Fixed
agentrickard’s picture

You could probably set that field conditionally based on language....

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.