This is a first and cautious patch for a soon-to-be-committed patch in apachesolr. It should reduce the work that DS needs to do for Apachesolr customizations
This patch includes
Attention : You do need the following patch for now to make this work #1314406: De-duplication of the apachesolr_search_execute and apachesolr_search_user_defined_search_page (Patch was submitted)
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | i1337610-21.patch | 1.35 KB | attiks |
| #14 | 1337610-14.patch | 17.76 KB | swentel |
| #8 | 1337610-8-ds-new-apachesolr-build-mode-support.patch | 7.82 KB | milesw |
| #2 | 1337610-2.patch | 7.4 KB | swentel |
| #1 | 1337610.patch | 4.31 KB | nick_vh |
Comments
Comment #1
nick_vhComment #1.0
nick_vhUpdated issue summary.
Comment #2
swentel commentedUpdate patch with the apachesolr entities support - you need the apachesolr-multientity branch to test.
Comment #3
nick_vhFollow #966796: Separate indexer for multiple entity types for further information
Comment #4
nick_vhComment #5
nick_vhAll needed functionality is in Beta14 or 15 of apachesolr so I suppose this should not be a stopper anymore
Comment #6
sandergo90 commentedThe patch works exellent. Thanx for this ;)
Comment #7
nick_vhLet's push this in! :)
Comment #8
milesw commentedThis worked well for me too.
To give a bit more summary for newcomers, this patch stores complete serialized nodes as a field in the Solr index so that node_load() can be avoided when DS is used for search results. Note: things will be pretty broken until you reindex all your content.
It looks like a new field zs_* was added to the apachesolr schema a few beta versions ago, so we can do away with the base64 encoding. Updated patch is attached.
I just tested this with a set of 50,000 lightweight nodes (not much text content). My solr index grew from 52mb to 194mb. Didn't check the time, but indexing performance maybe twice as slow.
Comment #9
swentel commentedInteresting re: that new field.
Other than that, this patch needs work. If entity api is not enabled is not going to work at all. I need to think a bit about this more this weekend.
Comment #10
swentel commentedComment #11
swentel commentedmoving to 7.x-2.x branch for now.
Comment #12
nick_vhzs_* does not exists, see summary of this issue. It is meant to use xs_
Comment #13
milesw commentedIt exists in my copy :)
Comment #14
swentel commentedUpdated patch which went in for 7.x-2.x (with a small typo along in field_ui.inc heh).
I'm currently *NOT* going to commit this in the 7.x-1.x branch as it involves some changes which could be confusing for users upgrading. Maybe in the future, we'll see. :)
Comment #15
nick_vh@milesw, you are actually right. I must have been confused or have looked at another schema. I've added this zs_ field myself :-)
so
xs_* = binary fields, base64 encoded data, stored not indexed
zs_* = string fields, stored not indexed.
We can choose one or the other, but we need to understand fully why we choose one. Would there be a big difference if we serialize the whole node compared to base64 the whole object?
Comment #16
swentel commentedAlso needs fix for files fallback if entity module doesn't exists as files can be indexed now as well which will be rendered in search results of nodes without entity module.
Comment #17
swentel commentedOk did some tests as well to compare, and also tracked the memory usage between the two on a results page. Indexed 5000 nodes:
With xs_
Index size: 49M
Search page: 1.04 MB, devel_shutdown()=5.72 MB, PHP peak=6.25 MB
With zs_
Index size: 49M
Search page: 1.04 MB, devel_shutdown()=5.68 MB, PHP peak=6.25 MB.
I have no differences in my index size, and memory is more or less the same (a little less at shutdown, but still). The goal (serializing the node) is still there.
(fallback mentioned in #16 has been fixed in the meantime).
Comment #18
swentel commentedOk, went ahead and dropped the base64 functions and use the zs_ field.
Let me know if this is completely wrong and should be reverted :)
Comment #19.0
(not verified) commentedUpdated issue summary.
Comment #20
nils.destoop commentedAs apache solr support has been broken for 7.1.x, this patch should be ported.
If this is not possible (looks like a huge patch), #1516764: Has Apache Solr update 7.x-1.0-beta19 broken ds search should be fixed another way.
Comment #21
attiks commentedQuick fix needed for one of my clients who couldn't update to ds 2.x