1. Home
  2. Docs
  3. WPFTS API Description
  4. Extended WP_Query

Extended WP_Query

You can control the WPFTS plugin search function using some additional parameters for WP_Query().

Here they are:

  • wpfts_disable
    0 (default value) = WPFTS Search is enabled;
    1 = WPFTS Search is disabled, and the usual WP search is used)
  • wpfts_nocache
    0 (default value) = The MySQL query cache will be used for search,
    1 = disable search – useful for benchmarking or to solve some issues)
  • word_logic
    (set ‘and’ or ‘or’ to specify the default search logic. “and” – only post records which have all words from the search phrase will be added to search results, “or” – all the posts containing at least one word from the queried phrase will be added to the search result)
  • cluster_weights
    an array contains key-value pairs like “post_content” => 0.5 which will be used for relevance calculations. You can effectively remove specific post parts from the search by setting the respective cluster weight to 0. For example, if you want to search for posts by post_title only, you can set up “post_title” => 1.0 and all other cluster weights to 0.
  • deeper_search
    0 (default value) will always search words that have the same beginning part as the queried word,
    1 = will try to search queried words in the middle of words). The value 1 definitely not recommended since it forces MySQL to make much more job.


0 0 vote
Article Rating
Was this article helpful to you? Yes No
Notify of
Inline Feedbacks
View all comments