Live search returns some posts with title starting with searched term only

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Live search returns some posts with title starting with searched term only

This topic contains 10 replies, has 2 voices, and was last updated by AlessandroF AlessandroF 6 years, 11 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #13017
    AlessandroF
    AlessandroF
    Participant

    Live search returns some posts with title starting with searched term only, but not even all of them.
    Index table enabled.
    This is a multi-site install but I configured no cross-site search.

    Try searching “tavola”:
    – no live search result
    – good suggestions
    – good regular search (regular WP search) https://www.foodweb.it/?s=tavola

    Try searching “caprotti”
    – 1 match only in live search
    – good regular search (regular WP search) https://www.foodweb.it/?s=caprotti

    #13028
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I’m guessing this might be only a configuration related issue, but I can’t tell, unless I’m able to see it.

    Can you please add temporary back-end and FTP details to your ticket. I would like to check the search and the index table configuration and debug the source if neccessary. Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #13031
    AlessandroF
    AlessandroF
    Participant
    You cannot access this content.
    #13039
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Alessandro,

    No problem, let’s try it this way. I’ve imported the search instance, and found only one possible issue within the configuration. On the Frontend Search settings -> Post tags panel the tag filters are enabled, but not used. Can you please turn them off?: https://i.imgur.com/m9fjcol.png

    My guess is that there might be a conflict whenever this filter is turned on, but the settings are hidden. Let me know if that changes anything.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #13040
    AlessandroF
    AlessandroF
    Participant

    I turned them off, saved, cleared server and browser cache.
    Something changed but not fixed yet:
    – “caprotti” live search now returns 6 post with title starting width “caprotti” (correct results are much more and live search limit is set to 10)
    – “tavola” (and many others) live search still returns no result

    Maybe there’s a post_title LIKE ‘<search_term>%’ sql condition somewhere.

    I tried switching to regular engine but I get results from the other blog switch is in different language (english vs italian).
    I’ve quickly reverted to indexed table.

    I tried to investigate plugin code mostly includes/classes/search/class-asp-search-indextable.php from line 390 forward (423 picked my interest first), but couldn’t find a clue.

    #13050
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    May I ask which multi language plugin do you use?

    Because I see you have the custom ajax handler enabled, which very likely won’t work with any of them. I would suggest turning that off to see how that changes the outcome: https://i.imgur.com/j6ia999.png

    What happens if you create a new search instance, with the default configuration, and only change the engine to index table? If that works, then at least we know it’s something with the search config. If not, then it’s probably the index table config.

    I feel like this is something very obvious, but unfortunately the importing may not display all the options – for example category/term exclusions and filters, if the same categories and objects with the same IDs does not exist on my installation as well, obviously.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #13057
    AlessandroF
    AlessandroF
    Participant

    I’ve done many tests starting from your suggestions and I think I found the original problem.

    I have a multisite installation:
    http://www.foodweb.it (own custom theme, own original content, same plugins, many copied configurations, italian language)
    http://www.italianfood.net (own custom theme, own original content, same plugins, many copied configurations, english language)

    I created http://www.foodweb.it first then when I created http://www.italianfood.net I exported ASP instance configuration from http://www.foodweb.it and imported it in the new site.
    Then I changed ASP instance in http://www.italianfood.net . Very few changes, mainly labels change (translation) and Multisite Options to http://www.italianfood.net .
    I experienced some problems with labels translation but I had no time to investigate.

    Now I found that ASP instances get syncronized/replicated/shared in http://www.foodweb.it and http://www.italianfood.net
    Labels settings, Multisite Options, all settings.
    New test instance created in http://www.foodweb.it (as you suggested) appear in http://www.italianfood.net too.

    Resetting Multisite Options to default (no blog dragged to right list) fix live search results for both sites but labels problem is still present.

    How can I separate sites?
    As a quick fix I’ve duplicated current instance (export+import) and use one for http://www.foodweb.it and another for http://www.italianfood.net
    Now I’m configuring the new instance for http://www.italianfood.net needs and fixing all ASP instance references (theme css, ecc.).
    There’s a better way?

    Thanks,
    Alessandro

    #13059
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Alessandro,

    Well, the instances are indeed shared, but problems can arise whenever there are some advanced features in use – like category/term exclusions, filters etc.. – as most of these objects are not shared across the multisite blogs.

    If the network is not too big, this should be the best solution. If one single search instance can handle all requirements, and the only issue is the language of the labels, then it is possible actually to translate the labels using PolyLang or WPML string translations: https://wpdreams.gitbooks.io/ajax-search-pro-documentation/content/translating_components.html

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #13064
    AlessandroF
    AlessandroF
    Participant

    Ok, seeing configuration not in network admin but in site admin I misunderstood.

    What configurations are shared?
    Instances only?
    Index table indexes?
    Other configurations?

    Thanks,
    Alessandro

    #13067
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Alessandro,

    Everything is shared across the network, as the plugin uses separate database tables to store the configuration and everything else.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #13068
    AlessandroF
    AlessandroF
    Participant

    Ok, so no wp_2_* tables.
    I found that Index Table “Stop Words” configuration is not shared so I misunderstood.

    Now all is fixed.

    Thanks for you help,
    Alessandro

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Live search returns some posts with title starting with searched term only’ is closed to new replies.