Forums / Developer / searchThresholdValue stops search too often.

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

searchThresholdValue stops search too often.

Author Message

Kai Duebbert

Saturday 27 September 2003 11:04:00 pm

Hi,

I don't understand the use of $searchThresholdValue in lines 785-791 (file kernel/search/plugins/ezsearchengine/ezsearchengine.php):
[...]
$searchThresholdValue = $totalObjectCount;
if ( $totalObjectCount > $stopWordThresholdValue )
{
$searchThresholdValue = (int)( $totalObjectCount * ( $stopWordThresholdPercent / 100 ) );
}

// do not search words that are too frequent
if ( $searchPart['object_count'] < $searchThresholdValue )
{ [...]

Now, I understand that it gets calculated, if it's bigger than $stopWordThresholdValue. But why does it get set to $totalObjectCount as default??

Even if I set the threshold for stopwords very high, the search still stops sometimes, because of searchThresholdValue being to high.

Can someone explain this or is it a bug? (The search system has many problems.)

Thanks,
Kai