This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Disable Searching 'Ending with' for Index Table

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Disable Searching 'Ending with' for Index Table Reply To: Disable Searching 'Ending with' for Index Table

#19794
samyagshahsamyagshah
Participant

I made following changes in /includes/classes/search/class-asp-search-terms.php :

1. Changed default value of $wcl variable to empty string.
[code]$wcl = ”; // Wildcard Left[/code]

2. Added another where clause to retrieve values where the word is not the first in the title string.
[code]/*———————– Title query —————————*/
if ($kw_logic == ‘or’ || $kw_logic == ‘and’ || $is_exact ) {
$parts[] = "
(" . $pre_field . $wpdb->terms . ".name" . $suf_field . " LIKE $pre_like’$wcl" . $word . "$wcr’$suf_like
OR " . $pre_field . $wpdb->terms . ".name" . $suf_field . " LIKE $pre_like’$wcr " . $word . "$wcr’$suf_like
)";
[/code]

And its giving desire output, but its affecting the performance. Could you please review it.

One quick question, since all required Taxonomies are indexed in index table can’t we disable source2 & add logic returning taxonomy terms as results in results returned by index table query?

  • This reply was modified 7 years, 7 months ago by samyagshahsamyagshah.
  • This reply was modified 7 years, 7 months ago by samyagshahsamyagshah.
  • This reply was modified 7 years, 7 months ago by samyagshahsamyagshah.