Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Plugins
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2021 at 16:19 UTC
Updated:
26 Jan 2022 at 13:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mikran commentedComment #4
mikran commentedComment #5
mikran commentedWe had similar need so I went ahead and implemented it. @lexsoft could you test if this does what you had in mind?
Comment #6
lexsoft commentedSure, will check it later next week. Thanks for the good work!
Comment #7
lexsoft commentedHi @mikran,
The processor works but it shows the machine name for blocks as well. It will be great if we can limit what entity types we want to index.
Comment #8
drunken monkeyGood idea, thanks a lot both to lexsoft for the suggestion and to mikran for the implementation. Great that you even included a test already!
Unfortunately, due to #3190024: Problem with test dependencies when testing issue forks, we cannot use issue forks in this project but need to use patches instead. (Although I see that you managed to get a passing test by switching back to Drupal 8.9 – interesting …)
However, aside from that this seems more or less good to go. While I’m not sure how many people will actually have a use case for this, it is a very small change, so should be harmless enough to add.
It might actually be good to have a) the map of possible values and their labels available somewhere and b) a generic property for the bundle, too – but both of these should probably just be added later, in case people actually ask for them.
I just had a few minor changes – please see the attached patch and interdiff. If these look good to you, then only this remains to clear up before committing:
I’m not sure what you mean by that? You are indexing blocks but don’t want the field to contain
blockfor those? That seems to be quite a specific requirement, not sure we want to support that out-of-the-box.Comment #9
drunken monkeyAny more feedback on this? I could commit once this is cleared up.
Comment #10
mikran commentedinterdiff looks good to me and I like the idea of adding a generic bundle property too. This was not a big issue as all the entities I've used are providing the bundle property already and aggregated field works fine for those, even if it was slightly more work to configure.
Comment #12
drunken monkeyGood to hear, thanks for the feedback.
Committed. Thanks again!