Reputation: 5471
I'm trying to suss out the Joomla 2.5 Smart Search. I followed some instructions here - http://magazine.joomla.org/issues/issue-feb-2012/item/671-Developing-a-Smart-Search-Plugin - I managed to get my plugin installed and items from my component were being indexed in the smart search component in the administrator section..
But when I go to the front end of my site and type in one of the names of the products, it says no results found. Yet as mentioned before the same product is displaying fine in the admin component smart search, it just won't show up on the front end when I search for it.
I'm not sure what I've done wrong, or if I'm missing something?
Here's my plugin file structure:
/plugins/finder/products/language/en-GB/en-GB.plg_finder_products.ini
/plugins/finder/products/language/en-GB/en-GB.plg_finder_products.sys.ini
/plugins/finder/products/products.php
/plugins/finder/products/products.xml
/plugins/finder/products/script.php
I also added the route.php in my site components helper folder.
Any ideas on what I've done wrong, or if anyone could tell me how to print out the search query itself on the results page, so I can see where things are going wrong? I don't know, any help would be appreciated really :)
Thanks guys
Upvotes: 1
Views: 2358
Reputation: 21
Does your component use access levels? I've just been looking into smart search plug-ins and found that the reason why nothing was appearing on the front end for my component despite being indexed was because it didn't know what the access levels of that component's articles were.
As my component didn't use access levels, I found that adding "$item->access=1;" to the index() function was a hack that fixed it by conning it into thinking the access levels were public (though just a hack, mind you, and should not be considered the correct solution.)
Anyway, I had the same problem and that was the cause.
Upvotes: 1
Reputation: 9330
Without some code to look at I can't suggest more than turning on Joomla!'s debug mode and setting the error reporting to it highest level ie.'Development'.
Debug Mode: Site->Global Configuration->System->Debug System->Yes
Error Reporting: Site->Global Configuration->Server->Error Reporting->Development
That way you'll get all the SQL queries in the Joomla! Debug Console and that will help a little.
Upvotes: 3