Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Plugins
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 May 2015 at 07:26 UTC
Updated:
22 Feb 2017 at 11:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ptmkenny commentedHere's a patch to add this feature.
Comment #2
ptmkenny commentedComment #3
drunken monkeyGood idea, thanks for the patch!
Seems small and simple enough to not cause any trouble, I'd say. I just have some corrections for the doc comments and the description (we should included the same warning as for the "Exclude unpublished nodes" alteration, I'd say). See the attachments.
Comment #4
drunken monkeyCommitted.
Thanks again!
Comment #7
drunken monkeyAh, forgot that this of course also needs to be ported …
Comment #8
drunken monkeyPretty easy, I'd say, but would be a (slight) regression if we didn't have it in the first stable release.
Also, instead of porting the processor, we might just want to expand/rename the existing "Node status" processor to cover users, too (and maybe other entity types).
Comment #9
drunken monkeyTook my suggestion from #8. The new "Entity status" processor supports nodes, comments and users, and also has better test coverage than the old "Node status" processor.
An update function is included, too, of course, to switch to the new processor. I guess we should also warn about that in the release notes. The update function, once again, does not have test coverage, though. I'd need a good example for how to do that.
Comment #11
drunken monkeyAh, yes, forgot a few things.
Comment #13
drunken monkeyComment #15
drunken monkeyRe-roll.
Comment #16
borisson_Only nits to pick.
Where does that happen?
Can we add the comment here about EntityPublishedInterface as well?
/s/multiple/all/?Comment #17
drunken monkeyIn the next line, by passing
TRUEtosave().I just stole the code from some Core update function, probably Block or Views, and that had the same comment (and parameter). Pretty important to include, actually, I guess.
I don't see how it would apply there? While it is possible to extract the entity class and check whether it implements
EntityPublishedInterface, I really don't think that's worth it. (Also, this only applies to nodes and comments, so we'd have to hard-code users anyways.)In
alterIndexedItems()it would just allow us to combine the twoifblocks for nodes and comments, that's all – a pretty trivial change. Using it insupportsIndex(), too, would be a significantly larger change, that would have to be its own feature request (in case someone wants support for another content entity type that implements that interface).Comment #18
borisson_Ah, thanks for explaining.
Comment #20
drunken monkeyThanks again for your input!
Committed.