It's a problem currently in D7 that people don't notice the warning in the Solr service class description to disable their processors, and subsequently have huge problems, e.g., when Tokenizer is enabled.
We should therefore add a way for service classes to influence the processor choice in some way.

Probably we should still let the user choose these processors, but just discourage them from doing it by some visual means. #2228737: Add an "Advanced mode" global setting could help a lot with that, allowing us to just completely hide the non-supported processors from non-expert users.

Estimated Value and Story Points

This issue was identified as a Beta Blocker for Drupal 8. We sat down and figured out the value proposition and amount of work (story points) for this issue.

Value and Story points are in the scale of fibonacci. Our minimum is 1, our maximum is 21. The higher, the more value or work a certain issue has.

Value : 8
Story Points: 5

Comments

nick_vh’s picture

Title: Allow service classes to filter the available processors » Allow backend plugins to filter the available processors
Issue summary: View changes
Issue tags: +beta blocker
borisson_’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new1.99 KB

I'll write a test for this now, but this is a patch that implements the code already. I've tested this manually and that works.

Status: Needs review » Needs work

The last submitted patch, 2: allow_backend_plugins-2228739-2.patch, failed testing.

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new944 bytes
new2.07 KB

Still need to get that test in, but this fixes the failures introduced in #2.

borisson_’s picture

Issue tags: -Needs tests
StatusFileSize
new5.3 KB
new6.11 KB

Added a test

borisson_’s picture

This still applies, is there any work I can still do on this issue?

drunken monkey’s picture

StatusFileSize
new4.68 KB
new5.17 KB

Oh, sorry for that! Seems I left the tab open to look at it later but then forgot. Thanks for bumping!

The patch looks very good, thanks! I guess we can very well leave it to the backend modules whether they want to provide a mechanism for other module defining processors to discourage them for that backend.

The patch was mostly great, I just don't really like the method name, limitProcessorSuggestions. For me, that sounds a bit like it would return the compatible processors, not the discouraged ones, or maybe alter the array of processors. In the attached patch suggest getDiscouragedProcessors() – also a bit unwieldy, but still an improvement in my opinion.
I also don't think we need a new test backend class, we can just use the state (once again) to determine the method's return value in the existing test backend.

Please see my attached patch for the suggested changes and tell me what you think!

And, in any case, thanks again!

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

I like this. The new name is better.

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Great to hear, thanks!
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.