Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm not sure if this is an Search API or Search API Solr issue, but an issue none-the-less.
I added the General -> URI field to my search index along with other fields. When I check the index in solr, I see
"sm_url": [
"/path/alias/to/node"
],
However, when I build a view using the index, and select the URI field as one of the outputted fields, it doesn't output the data.
Comments
Comment #2
dermarioI could reproduce that behaviour on my local installation. I could see that only entity ids like entity:node/10:en are retrieved from the solr server. I could retrieve other fields directly from solr by Checking Retrieve result data from Solr in the solr server configuration (Advanced tab). I think it works as designed and is not a bug.
Comment #3
mkalkbrennerThis is the correct behavior. By default every Search API backend just uses the fields to search through them. But the returned result only consists of a IDs that Search API itself handles. So the problem @sagesolutions describes seems to be bug in Search API or Views.
If you write some custom code that bypasses Search API to handle the result it makes sense to get more data from Solr than IDs. That's what the "Retrieve result data from Solr" option is available for.
Comment #4
mkalkbrenner