Skip to content
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

Error turning on sorting by relevance #1255

Open
neemiasjr opened this issue Sep 21, 2016 · 1 comment
Open

Error turning on sorting by relevance #1255

neemiasjr opened this issue Sep 21, 2016 · 1 comment
Assignees

Comments

@neemiasjr
Copy link

Dear, to enable sorting by relevance in version 2.9.5, php server returns the error below:

phpMyFAQ warning [2]: pg_query (): Query failed: ERROR: column "relevance_thema" does not exist LINE 9: ORDER BY DESC relevance_thema, relevance ... ^ in / sites / base / homologation / inc / PMF / DB / Pgsql. php on line 112
Fatal error: Uncaught exception 'Exception' with message 'Error while fetching result: ERROR: column "relevance_thema" does not exist LINE 9: ORDER BY DESC relevance_thema, relevance ... ^' in / sites / base / homologation / inc / PMF / DB / Pgsql.php: 170 Stack trace: # 0 /sites/base/homologacao/inc/PMF/Relation.php(106): PMF_DB_Pgsql-> fetchAll (false) # 1 /sites/base/homologacao/artikel.php ( 175): PMF_Relation-> getAllRelatedById ('10' '(1004) Pineapple', 'Guava') # 2 /sites/base/homologacao/index.php(767): require ( '/ sites / base / hom .. . ') # 3 {main} thrown in /sites/base/homologacao/inc/PMF/DB/Pgsql.php on line 170

After checking the query in postgres server, I captured the following query in the database:

SELECT
fd.id AS id, fd.lang AS lang, fcr.category_id AS category_id, fd.thema AS question, fd.content AS answer, TS_RANK_CD(SETWEIGHT(TO_TSVECTOR(COALESCE(fd.keywords, '')), 'C'), query) AS relevance_keywords
FROM
phpmyfaq_crel_faqdata AS fd LEFT JOIN phpmyfaq_crel_faqcategoryrelations AS fcr ON fd.id = fcr.record_id AND fd.lang = fcr.record_lang , plainto_tsquery('Check list diário da SSCO

checklist, check list, check-list, SSCO') query
WHERE
((to_tsvector(coalesce(fd.keywords,''))) @@ query) OR (fd.keywords) ILIKE ('%Check list diário da SSCO

checklist, check list, check-list, SSCO%')
AND fd.active = 'yes' AND fd.lang = 'pt-br'
ORDER BY relevance_thema DESC, relevance_content DESC, relevance_keywords DESC

@neemiasjr
Copy link
Author

neemiasjr commented Sep 21, 2016

I did a clean install of 2.9.5 version and the same error occurs when you enable sorting by relevance. I upgraded version .2.8.12 -> 2.9.0 -> 2.9.5 and error also occurs.

@thorsten thorsten added the Bug label Sep 23, 2016
@thorsten thorsten added this to the 2.9.6 milestone Sep 23, 2016
@thorsten thorsten self-assigned this Sep 23, 2016
@thorsten thorsten modified the milestones: 2.9.7, 2.9.6 Jan 3, 2017
@thorsten thorsten modified the milestones: 2.9.7, 2.9.8 Apr 2, 2017
@thorsten thorsten modified the milestones: 2.9.8, 2.9.9 Jul 11, 2017
@thorsten thorsten modified the milestones: 2.9.9, 2.9.10 Aug 10, 2017
@thorsten thorsten removed this from the 2.9.10 milestone Feb 17, 2018
@stale stale bot added the wontfix label Jan 1, 2023
@thorsten thorsten removed the wontfix label Jan 1, 2023
Repository owner deleted a comment from stale bot Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants