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

sagesolutions created an issue. See original summary.

dermario’s picture

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

mkalkbrenner’s picture

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

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

mkalkbrenner’s picture

Status: Active » Closed (works as designed)