Hi,
The current category search plugin does not limit the indexing /search and therefore all the subcategories are indexed for search.
In my case, the subcategories are meaningless and it would be interesting to limit the smart search to the a maximum level and not to all of them.
Is it something other people are interested in and therefore a possible new feature of the plugin?
Phoca Gallery Category Finder Plugin (Categories): limit the search to a max level
-
marcoaiki
- Phoca Member

- Posts: 17
- Joined: 24 Nov 2009, 10:24
- Jan
- Phoca Hero

- Posts: 49569
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Gallery Category Finder Plugin (Categories): limit the search to a max level
Hi, the smart search feature is a Joomla feature, for now no idea, if it is possible to do such change 
Jan
Jan
If you find Phoca extensions useful, please support the project
-
marcoaiki
- Phoca Member

- Posts: 17
- Joined: 24 Nov 2009, 10:24
Re: Phoca Gallery Category Finder Plugin (Categories): limit the search to a max level
Maybe I'm wrong,
but the "Phoca Gallery Finder Plugin (Categories) (J6)" is a classic adapter for joomla smart search (finder).
In the method getListQuery() you can add a where condition to limit the indexing to the main levels,e.g.:
for only the main level
if you want to maintain only the first and second level, the where condition will be:
well ... considering more than two level entails also to a more complicated sql
and of course there is also the problem of adding a setup option in the admin plugin page ....
but the "Phoca Gallery Finder Plugin (Categories) (J6)" is a classic adapter for joomla smart search (finder).
In the method getListQuery() you can add a where condition to limit the indexing to the main levels,e.g.:
for only the main level
Code: Select all
$query->select($case_when_category_alias)
->from('#__phocagallery_categories AS a')
->join('LEFT', '#__phocagallery_categories AS c ON c.id = a.parent_id')
->where('a.parent_id = 0'); // <--- for categories without parent category
//->where('a.approved = 1');
return $query;
if you want to maintain only the first and second level, the where condition will be:
Code: Select all
->where('(a.parent_id = 0 OR c.parent_id = 0)');
and of course there is also the problem of adding a setup option in the admin plugin page ....