Closed (fixed)
Project:
Apache Solr Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2013 at 12:56 UTC
Updated:
24 Jun 2013 at 17:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
nick_vhFirst take, will work more on this when I have time.
Comment #2
nick_vhComment #3
nick_vhChecking if this breaks anything, also adding some more typing in the function definitions.
Comment #5
nick_vhComment #7
nick_vhComment #9
nick_vhMeh, stupid menu system
Comment #10
nick_vhComment #11
nick_vhCommitted this, will do a follow up later on.
Updated :
* apachesolr.drush.inc
* all the facetapi plugins
* Apache_Solr_Document.php
* Drupal_Apache_Solr_Service.php
* Solr_Base_Query.php
* apachesolr.admin.inc
* apachesolr.api.php
* apachesolr.index.inc
We should do all the other ones still.
Comment #12
ianthomas_ukIs this change intentional? It's not a documentation change, and has broken a couple of my facets (single value taxonomy fields).
Comment #13
ianthomas_ukI've proposed a fix for the facets this broke at http://drupal.org/node/1979506
Comment #14
nick_vhClosing this issue as it does not really has a good defined action item. Thanks for finding a little issue here.
Comment #15
pwolanin commentedneeds to eb backported?
Comment #16
pwolanin commentedsetting back to needs work. I think @ianmthomasuk is correct in #12 that the change to the field mappings was a mistake.
Comment #17
ianthomas_ukEven if it was committed accidentally, I think the behaviour in 1.2 makes sense and has the benefit that you can sort by the single-value field. The only exception I know about is taxonomy fields, which is addressed in https://drupal.org/node/1979506
Comment #18
pwolanin commented@ianmthomasuk - I thought we were already adding a single value version (the 1st value) for every field when indexing?
Comment #19
ianthomas_uk@pwolanin That's not what happens on my site, using 1.1 plus a few patches that shouldn't change that behaviour.
Comment #20
pwolanin commented@ianmthomasuk - check your index. It's possible we are not exposing that as a sort in the UI, but it should be there.
Comment #21
pwolanin commentedSee apachesolr.index.inc:
Comment #22
pwolanin commentedHere a patch reverting that change, plus a minor cleanup.
Comment #23
pwolanin commentedComment #24
ianthomas_ukI've been having a discussion with @pwolanin on IRC about the merits of this patch and whether it's desirable to attempt to index a multi-value Drupal field as a single value Solr field.
Benefits:
* You can change the cardinality of the field without re-indexing
* You can sort on the field
Drawbacks:
* The sort order can be inconsistent, as it depends on the order of the values in the multi-value field (e.g. if you have two nodes with multi-value price fields of (29.99, 19.99) and (24.99, 34.99) and you sorted by price asc then the second node would be listed first, when you probably wanted to sort by minimum price or maximum price).
* Slightly increases index size / indexing time
I'm marking this RTBC as an all-singing all-dancing solution would take quite a lot of work, and this at least resolves the regression for people upgrading from <1.1. It does need a release note to warn users of 1.2 that some of their fields will change back to their old names.
Comment #25
pwolanin commentedcommitted