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
[4.3] Smart Search: Don't republish items upon save #39944
Conversation
I'm not sure, I don't know much about smart search, maybe this? #36980 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39944. |
Unfortunately that issue is not the one I was looking for. |
Or maybe #32458 |
I have tested this item ✅ successfully on 5a66c06 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39944. |
This one #38838 ? |
Unfortunately none of these. I'm going to look further. But the issue of #38838 is very similar. |
OK - this time I am sure I found it #36980 |
That one is related to the taxonomies, which I'm still working on. |
I have tested this item ✅ successfully on 5a66c06 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39944. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39944. |
Thank you Hannes @Hackwar ! |
Pull Request for Issue # .
Summary of Changes
In Smart Search you can disable entries in the index by unpublishing them. Unfortunately, the entries were re-published when an item was saved again. I earlier claimed that it wasn't possible to prevent that behavior in our current system because I thought the state of the content item and the state of the item in the index were the same field in the database. I was wrong and we actually have a field named "published" for the state of the item in the index and "state" for the state item of the content item. Sorry, @brianteeman 😉 (Maybe you can help me find the issue where this was reported? I can't find it right now...)
After some debugging it turned out that in our finder plugins we are using the
reindex()
method of theAdapter
class in finder and that method falsely completely deletes the entry first from the index and then adds it back in again. This actually is far less performant than simply indexing again as the normal indexer does...Testing Instructions
Index your content and unpublish an entry in the index. Edit the content and without changing anything, save it again.
Actual result BEFORE applying this Pull Request
The item in the index is published again.
Expected result AFTER applying this Pull Request
The item stays unpublished until you publish it again.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed