Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "isIndexing" helper on StrawberryFlavor Data source #330

Closed
DiegoPino opened this issue Aug 8, 2024 · 1 comment
Closed

Use "isIndexing" helper on StrawberryFlavor Data source #330

DiegoPino opened this issue Aug 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working Drupal 10 Upgrade Economy (capitalism) enhancement New feature or request Events and Subscriber Search API F around and find out Strawberry Flavor Post Processing data extracted that goes into Solr Typed Data and Search

Comments

@DiegoPino
Copy link
Member

DiegoPino commented Aug 8, 2024

What?

Been trying to figure out why Views using Flavors as datasources are generating Index changes even when just querying. Drupal loads the Data Source (when using a field that does not say "indexed"?) and by doing that calls the Original key Storage which in turn triggers the dependency checks we do on the Data Source/flavor, and the parent invalidation we also do on indexing. Basically we are "updating" the index when this happens on every query.

This is so silly. Drupal Search API should provide two methods, one for the actual index, one for retrieving from the source. Because it reuses the Load Multiple, and does not provide any context (are we querying? are we actually indexing?) we end over processing.

This has performance effects of course but also basically kills the cache.
Another effect is that if we execute a direct Solr query with PROCESSING FULL (sometimes needed to get the actual NODE) that has Strawberry Flavors, we again trigger a Solr Update.

The solution is to use our new 1.4.0 Service that Sets a Flag when indexing starts via an event. We check via the container if that is the case and then we decide or not if updating tracked/related ADOs are needed or not

Uff. Bright side is: things will run even faster.

@DiegoPino DiegoPino added bug Something isn't working enhancement New feature or request Events and Subscriber Typed Data and Search Strawberry Flavor Post Processing data extracted that goes into Solr Search API F around and find out Drupal 10 Upgrade Economy (capitalism) labels Aug 8, 2024
@DiegoPino DiegoPino self-assigned this Aug 8, 2024
@DiegoPino
Copy link
Member Author

Resolved via bc567d1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Drupal 10 Upgrade Economy (capitalism) enhancement New feature or request Events and Subscriber Search API F around and find out Strawberry Flavor Post Processing data extracted that goes into Solr Typed Data and Search
Projects
None yet
Development

No branches or pull requests

1 participant