auto-patch 638-dev-dev01-2024-05-14T20_44_36
This commit is contained in:
@@ -270,7 +270,7 @@ function relevanssi_search( $args ) {
|
||||
|
||||
$total_hits += count( $matches );
|
||||
|
||||
$idf = log( $doc_count + 1 / ( 1 + $df ) );
|
||||
$idf = log( ( $doc_count + 1 ) / ( 1 + $df ) );
|
||||
$idf = $idf * $idf; // Adjustment to increase the value of IDF.
|
||||
if ( $idf < 1 ) {
|
||||
$idf = 1;
|
||||
@@ -460,10 +460,10 @@ function relevanssi_search( $args ) {
|
||||
if ( ! is_wp_error( $post_object ) ) {
|
||||
$hits[ intval( $i ) ] = $post_object;
|
||||
$hits[ intval( $i ) ]->relevance_score = round( $weight, 2 );
|
||||
}
|
||||
|
||||
if ( isset( $missing_terms[ $doc ] ) ) {
|
||||
$hits[ intval( $i ) ]->missing_terms = $missing_terms[ $doc ];
|
||||
if ( isset( $missing_terms[ $doc ] ) ) {
|
||||
$hits[ intval( $i ) ]->missing_terms = $missing_terms[ $doc ];
|
||||
}
|
||||
}
|
||||
}
|
||||
++$i;
|
||||
|
||||
Reference in New Issue
Block a user