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 25

Methods

__construct()

Constructor.

Since: 4.2.0
Line: 198

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: 273

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: 292

public function get_weights(  ): array;

Returns: array — Array of weights.

get_taxonomy_weights()

Get the weights for the taxonomies.

Since: 4.2.0
Line: 321

public function get_taxonomy_weights(  ): array;

Returns: array — Array of weights.

get_sql()

Generate the SQL for querying wp_posts.

Line: 351

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.

is_date_query_indexed()

Whether the date query is fully covered by the indexed publish date.

Since: 4.5.0
Line: 1070

public function is_date_query_indexed(  ): bool;

Returns: bool — True when PHP does not need to re-check the date filter.

get_results()

Execute the query and return results.

Line: 1305

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: 1336

public function get_total_found(  ): int;

Returns: int — Total found.

get_topscore()

Get the total number of matching posts.

Since: 4.2.0
Line: 1395

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: 1465

public function calculate_min_relevance(  ): float;

Returns: float — Calculated minimum relevance score.

is_recency_boosted()

Whether this search orders by a recency-boosted score rather than the raw score.

Since: 4.5.0
Line: 1536

public function is_recency_boosted(  ): bool;

Returns: bool — True when the first result row is not the highest raw score.

get_cache_attributes()

Return attributes used for cache key generation.

Since: 4.2.0
Line: 1548

public function get_cache_attributes(  ): array;

Returns: array