while I have a number of issues with smart search and the old search is not working on my upgraded site...
I have made a clean install of J4.1 to test the smart search / finder operation.
on my clean install I added a page called...
and did a search for art - finder displays ...
I don't want archived pages showing up in my search results...
to stop this "feature" from happening...
open administrator\components\com_finder\src\Indexer\Adapter.php
navigate to the bottom of the page - (line 901 on my file) and look for "case 2: " then comment it out like this...
// Published ~and archived items only~ should return a published state
case 1:
// case 2:
return 1;
go to administrator panel > components > smart search > index and press the "index" button at the top
search should omit them from search results. (Your mileage may vary - you may need to delete the index and do a re-index)
Be aware - future updates may break these changes, so until they are included in the core, you may need to redo this process every time you update Joomla.
Hope it helps someone.
(explanation...
case -2 is trashed
case 0 is unpublished
case 1 is published
case 2 is archived)
Originally posted by @nzyeehaa in #37754 (comment)
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Information Required
bug
|
Labels |
Removed:
Information Required
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-08-28 21:42:58 |
Closed_By | ⇒ | Hackwar |
@Hackwar thanks and good work...
for the indecision...
Joomlas native workflow hides archived pages.
in the front end,
a page marked archived does not show in a blog/list layout (tested with fresh install/cassiopeia)
a page marked archived does not show on the homepage (tested with fresh install/cassiopeia)
if you specifically enter the articles url it will show - but this may be due to a current routing issue
in the backend,
search for an archived article and it will not show up
archived pages are hidden unless you specifically filter for archived
Please update to Joomla 4.3, rebuild the index and check again. A lot of issues like these were fixed between 4.1 and 4.3