Starts a search query with every character

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Starts a search query with every character

This topic contains 4 replies, has 2 voices, and was last updated by Donovanray Donovanray 8 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7743
    Donovanray
    Donovanray
    Participant

    Hello WordPress Dreams,

    In the settings I choose not to automatically start search after every character, but if I check on the backend the plugin starts a new search every time i press a new character. On the front end I don’t see the search bar do a real search, only after pressing enter. But in the backend i can see that the plugin is starting a new search with every character that is put into the search box. This is causing my website to go offline because of the high demand on the database. Is there away the stop doing this and only start a search after I press enter or press the search button?

    Thank you.

    Kind regards,

    Erwin Haring

    PS. use FTP port 22 to connect.

    #7744
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Erwin,

    By back-end you mean the preview area of the search plugin? If so, there is a disclaimer, that in preview mode some functions might not work correctly: https://i.imgur.com/wSGgqSG.png

    If you mean the option search (“Can’t find an option?”), that is not an ajax search, but a client side text based search, and only affects the browser – it is not connected to the server, nor the database.

    Best,
    Ernest Marcinko

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


    #7754
    Donovanray
    Donovanray
    Participant

    Hello Ernest,

    No I mean that the plugin generates a search with every character that is typed into the search box. I can check it on the server end. I was wondering why my database connections where sky high and I noticed that with every character I type in the search box it generates a new search.

    Example:

    I want to search for: HP 85A

    The plugins starts a search when I type H.
    Than a new search when I type the P after the H, so now it searching HP
    Than HP 8
    Than HP 85
    Than HP 85A

    So it starts 5 different search queries where it only should start searching after I press enter or hit the search button. You do not see the search start on the front end. I only see the plugin do the search on the server end, i see my database connections go up without me hitten enter or the search button. Why is the plugin doing this?

    Thank you for your time.

    Kind regards,

    Erwin

    #7763
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I see what you mean now.

    It’s the search autocomplete. Logically it triggers on a key press with a low delay, and if another key is pressed it sends an abort command to terminate the previous execution request.

    You can turn autocomplete off on the Autocomplete & Suggestions -> Autocomplete panel.

    Best,
    Ernest Marcinko

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


    #7770
    Donovanray
    Donovanray
    Participant

    Hello Ernest,

    That must probably be it. Thank you for your help!

    Kind regards,

    Erwin

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

You must be logged in to reply to this topic.