Closed (fixed)
Project:
Search API Solr
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 May 2011 at 15:22 UTC
Updated:
6 Oct 2017 at 20:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drunken monkeyNo, I don't plan on adding this feature.
See here for a discussion why not: #1130806: Potential Performance Issues.
Here for performance benchmarks indicating there might not be much of a performance gain: #1135270: Performance comparison with Apachesolr module and Search API module (with benchmarks).
And, lastly, becw is working on a module called "Sarnia", which does pretty much what you want. The Github repository isn't there anymore, though, so you'll have to ask him where (or whether) the code is available, and how far he has gotten yet.
Comment #3
drunken monkeyEven though I still doubt this is a good idea, there were already several requests for this, so I guess we can just add this as an optional setting and let users evaluate and decide themselves.
The attached patch would do this, returning all stored field values of the search results when an option on the server is set.
Note, however, that the field data currently won't be used, until #1089758: Make use of new flexibility for Views field handlers is committed.
Comment #4
drunken monkeyRe-roll.
Comment #5
becw commentedSo, the first round of work on #1089758: Make use of new flexibility for Views field handlers has been committed. At this point, if field values are stored in Solr, then a view built with the Search API Views query backend will not load entities if all of the view's fields are present on the Solr search results. Additionally, values from Solr will be preferred over values from entities.
Given that one of the main points in #1130806: Potential Performance Issues is that "Entities that are loaded will always be up-to-date, invoke Field API magic (including support for translations) as well as other hooks correctly, etc.", perhaps this new behavior is a bug, and Entity values should instead be preferred over values from Solr.
@drunken monkey: perhaps the 'retrieve_data' flag from your patch in #4 should be used to trigger the new Search API Views behavior?
Comment #6
drunken monkeySince no-one complained, protested or objected, I'll just commit this now.
Comment #8
blasvicco commentedI will leave this here for anyone that need to achieve this feature:
Search API Solr PRO