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

No results found since 5.1.0 (but works like a charm in 5.0.4) #195

Closed
OLDOY opened this issue Oct 22, 2023 · 3 comments · Fixed by #197
Closed

No results found since 5.1.0 (but works like a charm in 5.0.4) #195

OLDOY opened this issue Oct 22, 2023 · 3 comments · Fixed by #197

Comments

@OLDOY
Copy link

OLDOY commented Oct 22, 2023

Hello,

I'm actually migrating ke_search from 4.2 to 5.1.0 for a client website and I have been struck with a bug after migrating: There's always no result found when I search with keywords (any).

I reindexed everything multiples times, recreated all the plugins and even converted to "Faceted search Searchbox and filter".

After trial and errors, I have found that if I reverted to 5.0.4, everything seems to be working as usual. It seems like a bug introduced in 5.1.0.

I'm using a "Faceted search Searchbox and filter" and a "Faceted search - Results" on a same page with indexed documents from Pages, Content and News all over the web page.

Did someone get this bug too?

Cheers,
Olivier

@agency-w52
Copy link

Seems to be an problem with the SQL-query:

working query from the 5.0.4 version:

SELECT SQL_CALC_FOUND_ROWS *, MATCH (title,content,hidden_content) AGAINST ('sword')+ (1 * MATCH (title) AGAINST ('sword')) AS score FROM `tx_kesearch_index` WHERE 1=1 AND MATCH (title,content,hidden_content) AGAINST ('sword*' IN BOOLEAN MODE)  AND pid in (1,30)  AND language IN(0, -1)  AND (`tx_kesearch_index`.`starttime` <= 1698078600) AND ((`tx_kesearch_index`.`endtime` = 0) OR (`tx_kesearch_index`.`endtime` > 1698078600)) AND (((`tx_kesearch_index`.`fe_group` = '') OR (`tx_kesearch_index`.`fe_group` IS NULL) OR (`tx_kesearch_index`.`fe_group` = '0') OR (FIND_IN_SET('0', `tx_kesearch_index`.`fe_group`)) OR (FIND_IN_SET('-1', `tx_kesearch_index`.`fe_group`)))) ORDER BY score desc LIMIT 10 

non-working query from the 5.1 version:

SELECT SQL_CALC_FOUND_ROWS *, MATCH (title,content,hidden_content) AGAINST ('sword')+ (1 * MATCH (title) AGAINST ('sword')) AS score FROM `tx_kesearch_index` WHERE 1=1 AND MATCH (title,content,hidden_content) AGAINST ('*' IN BOOLEAN MODE)  AND pid in (1,30)  AND language IN(0, -1)  AND (`tx_kesearch_index`.`starttime` <= 1698077220) AND ((`tx_kesearch_index`.`endtime` = 0) OR (`tx_kesearch_index`.`endtime` > 1698077220)) AND (((`tx_kesearch_index`.`fe_group` = '') OR (`tx_kesearch_index`.`fe_group` IS NULL) OR (`tx_kesearch_index`.`fe_group` = '0') OR (FIND_IN_SET('0', `tx_kesearch_index`.`fe_group`)) OR (FIND_IN_SET('-1', `tx_kesearch_index`.`fe_group`)))) ORDER BY score desc LIMIT 10

see AGAINST ('sword*' IN BOOLEAN MODE) vs AGAINST ('*' IN BOOLEAN MODE)

@chrosey
Copy link

chrosey commented Oct 24, 2023

Seems only to affect Search when you do not configure like suggested.
$GLOBALS['TYPO_CONF_VARS']['EXTENSIONS']['ke_search'][''additionalWordCharacters'] = '-.';

After this, searching worked again for me.

@christianbltr
Copy link
Member

This is fixed in version 5.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants