auto-patch 638-dev-dev01-2024-05-14T20_44_36

This commit is contained in:
root
2024-05-14 20:44:36 +00:00
parent a941559057
commit 5dbb0b284e
1812 changed files with 29671 additions and 14588 deletions

View File

@@ -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;