Problem/Motivation

The solr index might contain fields that don't directly reflect a drupal field. One example is the site hash.
If you think about multi-site searches it will happen that a drupal field exists only in one site or is named differently in all sites. Nevertheless we should support searching, filtering, sorting, facetting on these kind of "solr only fields".

Proposed resolution

Expose these fields :)

Remaining tasks

We need to define a common way to expose "solr only fields".

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#3 2682347_3.patch3.13 KBchx

Comments

chx created an issue. See original summary.

chx’s picture

Assigned: Unassigned » chx
chx’s picture

Status: Active » Needs review
StatusFileSize
new3.13 KB

This at least works for me and is only a small amount of code. I can't say whether it makes baby jesus cry or not.

Of course, if you have multi site awareness on and then add an alien hash as a condition then you are screwed. I guess we could trigger a views rebuild on config save (or is that automatic?) and then we can bail out from search_api_solr_views_data_alter if the checkbox is checked but then checking the checkbox breaks your views? I do not go there :)

mkalkbrenner’s picture

Title: Expose site hash to views » Expose solr fields to views
Issue summary: View changes
Status: Needs review » Needs work
chx’s picture

Assigned: chx » Unassigned

Shouldn't be assigned to me.

ndrake86’s picture

@mkalkbrenner will this case resolve this issue? Support Non-Fulltext Fields as Searched Fields in Views basically was told that the search_api will only support fields that are labeled as text but that doesn't fully work in Solr as Solr should be able to search any field type that is supported by the backend.

Grayside’s picture

Note that the patch in #3 no longer applies as Search API Solr no longer has any Views integration code.

mkalkbrenner’s picture

Title: Expose solr fields to views » Expose solr-only fields to views
mkalkbrenner’s picture

Status: Needs work » Closed (outdated)

The Solr Any Schema Backend should solve this issue.