Recent

Posts_SearchclassPro only

Class to perform search against wp_wz_posts table.

Namespace: WebberZone\Better_Search\Pro\Custom_Tables
Source: includes/pro/custom-tables/class-posts-search.php line 21

Methods

__construct()

Constructor.

Since: 4.2.0
Line: 173

public function __construct( array $args, Custom_Tables $custom_tables );
Type Name Description
array $args Array of arguments.
Custom_Tables $custom_tables Custom Tables instance.

get_fuzzy_multiplier()

Get fuzzy score multiplier based on level.

Since: 4.2.0
Line: 233

public function get_fuzzy_multiplier(  ): float;

Returns: float — Fuzzy score multiplier.

get_weights()

Get the weights for the title, content, excerpt, and fuzzy search.

Line: 252

public function get_weights(  ): array;

Returns: array — Array of weights.

get_taxonomy_weights()

Get the weights for the taxonomies.

Since: 4.2.0
Line: 277

public function get_taxonomy_weights(  ): array;

Returns: array — Array of weights.

get_sql()

Generate the SQL for querying wp_posts.

Line: 304

public function get_sql( $with_min_relevance = ... ): string;
Type Name Description
bool $with_min_relevance Whether to include min relevance clause.

Returns: string — SQL string.

get_results()

Execute the query and return results.

Line: 605

public function get_results(  ): array;

Returns: array — Array of associative result rows.

get_total_found()

Get the total number of matching posts.

Since: 4.2.0
Line: 636

public function get_total_found(  ): int;

Returns: int — Total found.

get_topscore()

Get the total number of matching posts.

Since: 4.2.0
Line: 690

public function get_topscore(  ): float;

Returns: float — Top score.

calculate_min_relevance()

Calculate minimum relevance threshold based on topscore and settings.

Since: 4.2.0
Line: 748

public function calculate_min_relevance(  ): float;

Returns: float — Calculated minimum relevance score.

get_cache_attributes()

Return attributes used for cache key generation.

Since: 4.2.0
Line: 775

public function get_cache_attributes(  ): array;

Returns: array