Bundle handling has multiple issues stemming from the use of delta's to store exclusions, and bundle labels to store available bundle types.

  1. Adding, removing or renaming a bundle will break the exclusion list, as the list is stored according to the order in which bundles appear (delta)
  2. Adding or removing bundles from the search index has the same effect
  3. Duplicate bundle names in different entity types will be filtered out, leading to unpredictable results
  4. Removing bundles can lead to an error being thrown during searching, which will flag search as being unavailable, and turn search off

Patch coming...

CommentFileSizeAuthor
#4 2224325-4-broken-bundle-info.patch20.3 KBxtfer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xtfer’s picture

Issue summary: View changes
xtfer’s picture

Issue summary: View changes
xtfer’s picture

Title: Bundle exclusion counting is completely broken » Bundle exclusion breaks when indexed bundles change
xtfer’s picture

Status: Active » Needs review
FileSize
20.3 KB

This patch does the following:

  1. Changes the behaviour of multisite metadata indexing operations to store entity type and name, as well as bundle type, name and entity association
  2. Correctly maps bundle filters using bundle machine names (not delta's)
  3. Cleans up any touched functions according to coding standards
  4. Provides some update information in an update hook, and to inform users when bundle info is stale and needs to be refreshed
  5. Conform's the Admin UI where appropriate

Providing in an upgrade path is tricky, since the existing data is not entity_type aware, may have confused bundle keys, and may well be incorrect anyway. The best upgrade path is to inform users they need to check and redo their exclusion settings (if they have any), so I've added some helpers for that.

I was unable to determine how to apply subqueries to filter by bundle name AND entity type (or site hash, for that matter), so Ive just left bundle filters at query time pretty much as they are. More complex filtering may be quite difficult due to the nature of Solr filters, however the data is all there, so someone with better Solr query chops than me may be able to resolve that now.

xtfer’s picture