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

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • samyagshahsamyagshah
    Participant

    Thanks. Its working now.

    in reply to: Disable Searching 'Ending with' for Index Table #19961
    samyagshahsamyagshah
    Participant

    Ok Thanks. Let me try.

    in reply to: Taxonomies Marked as Tags in IndexTable #19960
    samyagshahsamyagshah
    Participant

    Ok. Thanks

    in reply to: Disable Searching 'Ending with' for Index Table #19814
    samyagshahsamyagshah
    Participant

    No need to say sorry. 🙂

    Two quick questions:
    1. 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?
    2. If #1 is not possible, is there any other way of adding above discussed like statements without modifying core files?

    in reply to: Disable Searching 'Ending with' for Index Table #19811
    samyagshahsamyagshah
    Participant

    Please find my comments below:

    For #1: Because without the change, one like query match is executed for ‘%phrase%’.

    Comment: Yes you are right.

    For #2: Whith the change, you have 2 like queries for ‘phrase%’ and ‘%phrase%’, where the ‘%phrase%’ actually includes everything matching the ‘phrase%’ as well.

    Comment: For 2nd like query there is space between % & phrase.
    ‘<% phrase%>’

    You are the expert, you can only tell me what needs to be done in order to achieve desired result.

    in reply to: Disable Searching 'Ending with' for Index Table #19807
    samyagshahsamyagshah
    Participant

    I have added 2nd query in order to retrieve values where the word is not the first in the string. Say for Example:
    Taxonomy Title is: “Ajax Search Pro – Very Powerful Search Plugin.”
    Search Keyword is: “Search”

    No results are retrieved since Search Keyword is not first in the string. (In case of Source 2)

    Logic used in 2nd query is : % search-keyword%
    There is space between % & search-keyword

    Are we on the same page?

    in 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[] = &amp;amp;quot;
    (&amp;amp;quot; . $pre_field . $wpdb-&amp;amp;amp;gt;terms . &amp;amp;quot;.name&amp;amp;quot; . $suf_field . &amp;amp;quot; LIKE $pre_like’$wcl&amp;amp;quot; . $word . &amp;amp;quot;$wcr’$suf_like
    OR &amp;amp;quot; . $pre_field . $wpdb-&amp;amp;amp;gt;terms . &amp;amp;quot;.name&amp;amp;quot; . $suf_field . &amp;amp;quot; LIKE $pre_like’$wcr &amp;amp;quot; . $word . &amp;amp;quot;$wcr’$suf_like
    )&amp;amp;quot;;
    [/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.
    in reply to: Disable Searching 'Ending with' for Index Table #19793
    samyagshahsamyagshah
    Participant

    Under Sources 2, if taxonomies in which the category belongs to is selected, all 3 types of search logic viz. Starting with, ending with & anywhere is used only for Sources 2 but I want only “starting with” to be used.

    I am assuming you must be using operator like %keyword%. Can I update this logic to keyword%

    I tried changing General Options -> Logic & Behaviour -> Secondary logic -> AND but it didn’t work.

    in reply to: IndexTable searching inner parts #19781
    samyagshahsamyagshah
    Participant

    Ok. Thanks. Appreciate your help.

    in reply to: Disable Searching 'Ending with' for Index Table #19779
    samyagshahsamyagshah
    Participant

    Thanks its working. But one new problem.

    When searched for particular Taxonomy, products associated to it is displayed, but actual taxonomy with product count in bracket is not displayed.

    Say product category taxonomy named ‘Product-Category-1’ has 2 different products ‘Product-1’ & ‘Product-2’. When searched for ‘Product-Category-1’, ‘Product-1’ & ‘Product-2’ are displayed but actual ‘Product-Category-1’ with Product count is not displayed.

    in reply to: IndexTable searching inner parts #19757
    samyagshahsamyagshah
    Participant

    I figured out the problem ‘term_reverse’ for some of my products were causing the problem.

    Is there any specific use of ‘term_reverse’?

    in reply to: IndexTable searching inner parts #19754
    samyagshahsamyagshah
    Participant

    Is there any to check what DB query is getting fired?

    I tried enabling ASP_DEBUG but not sure where to see debug data. Also when I enable it on front-end warning is received “Warning: Seems like you are using the Search feature (Chosen script) in search settings but the Chosen jQuery script is not loaded”

    Also tried enabling Debug bar but no ASP query gets printed.

    in reply to: IndexTable searching inner parts #19751
    samyagshahsamyagshah
    Participant

    Thanks for quick reply. Here is my reply to check list:

    #1 – Yes only desired fields are indexed & I have regenerated index table too & checked for the results. But no luck.
    #2 – Yes its indeed used.
    #3 – Yes its turned off.
    #4 – Yes, there is no exact matching filter.

    Do let me know if you need more details.

    in reply to: Allow search through "TermMeta" Database Table #18616
    samyagshahsamyagshah
    Participant

    Ok Thanks. Appreciate your help.

    in reply to: Allow search through "TermMeta" Database Table #18608
    samyagshahsamyagshah
    Participant

    Thanks. Its working. Appreciate your help.

    One last question: What changes needs to be done in above provided “where clause” if I change My Primary keyword logic from “AND with exact word matches“ to “AND” ?

Viewing 15 posts - 1 through 15 (of 20 total)