eZ Community » Forums » eZ Publish 5 Platform » Problem with SearchHelper of DemoBundle

Problem with SearchHelper of DemoBundle

Problem with SearchHelper of DemoBundle

Tuesday 03 February 2015 2:54:01 pm - 4 replies


I use the same configuration of the demobundle to my Search Module :

When i use my search page, some terms have no results. I don't understand why, in the backend for the same term i have a lot of results.



Modified on Tuesday 03 February 2015 2:54:23 pm by Johann Roc

Tuesday 03 February 2015 3:33:51 pm

it's due to the value of searchThresholdValue variable in the file https://github.com/ezsystems/ezpu...ateway/CriterionHandler/FullText.php

Default is 20. If i change by 2000000 it's ok happy.gif Emoticon
I don't understand what is this variable, and I don't know how to override itself in my SearchHelper or In my Controller ?

Tuesday 03 February 2015 4:00:46 pm

It's probably to avoid common terms like "the" to be searchable, there is similar concept in legacy (admin backend), however that is a completely different implementation.

In legacy the default settings for same concept is:

# Only use stop words if total objects is greater than StopWordThresholdValue
# Do not search words which are present in more than StopWordThresholdPercent % of total objects


Feel free to propose changes here, the Legacy StorageEngine implementation with default of 20 is obviously bit un optimized here so a possible Pull Request can probably easily improve this.

Modified on Tuesday 03 February 2015 4:03:44 pm by André R

Tuesday 03 February 2015 6:41:56 pm

Hello Johann,

I'm glad you could quickly find the cause. Thank you for sharing!

@André You beat me to sharing the legacy explanation blunk.gif Emoticon

@Johann Please do consider submitting a pull request to improve this issue for everyone else!


Wednesday 04 February 2015 9:46:24 am

Thanks you for your answers.

I created a pull request : https://github.com/ezsystems/ezpublish-kernel/pull/1166 

Modified on Wednesday 04 February 2015 9:46:50 am by Johann Roc


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from