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
Component Smart Search doesn’t work with a postgresql database #30412
Comments
@Hackwar Could you have a look on this? Thanks in advance. |
1st thank you @Hug067 for investigating on this with postgresql 11.7 i've replaced before that indexer from admin doesn't work and search from frontend does not display suggestion, now indexer from admin works and from frontend display suggestion but : you cannot use i got notice on frontend search
and this is the frontend search result you are very near to the perfect solution 👍 |
I hadn't thought of that...
The new file is in attachmentsearch.txt This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30412. |
@alikon just wondering if there will be a PR coming for this |
Can you please test this again? Because the code has been changed quite a bit (by me) and the bug should have been unknowingly fixed during that. I can't replicate it anymore. |
Sorry, I missed that this is for 3.9 and not 4.0. |
Here would be the fix: #31787 |
Closing as having a pull request. Please test #31787 . Thanks in advance. |
not solved by #31787 |
#31809 should fix this. |
Closing as having a pull request. Please test #31809 . Thanks in advance. |
Steps to reproduce the issue
Home Dashboard -> Components -> Smart Search
Expected result
When typing « Getting Started » in the search Terms bar, propositions should be proposed to the user. The article « Getting Started » should appear in the result.
Actual result
When typing « Getting Started » in the search Terms bar no proposition is displayed and no result is found for query « Getting Started ».
System information (as much as possible)
Joomla 3.19.20
Postgresql 9.5
PHP 7.3.12
Additional comments
After some search, I noticed that the table #__finder_terms is empty in postgresql, the problem seems to come from the file :
"… \administrator\components\com_finder\helpers\indexer\driver\postgresql.php"
The query from line 277 to 299 doesn’t work in postgresql. After modifying the query like below the query works as expected :
Then the code from line 320 to 344 result in a error when indexing the content of the site. So I commented the lines 321 to 328 and line 344 like below.
Now after indexing the content of the site, and typing « Getting » in the search terms bar, some propositions are displayed to the user. However the query returns a PHP error :
Problem comes from the line 130, the serialize object isn’t correctly insert in the database, replace the line 130 by the following code solves the problem :
Do the same for the line 157 :
Then, we just need to modify the line 129 of the file « …\components\com_finder\models\search.php » to obtain the expected result :
In the component "Smart Search", clear the index, re-click on Index for indexing articles. Now everything works as expected (well I think but there may be another problem...).
The modifed files are in attachments.search.txt
postgresql.txt
The text was updated successfully, but these errors were encountered: