Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Starts a search query with every character
- This topic has 4 replies, 2 voices, and was last updated 10 years, 3 months ago by
Donovanray.
-
AuthorPosts
-
February 18, 2016 at 11:29 am #7743
Donovanray
ParticipantHello 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.
February 18, 2016 at 11:38 am #7744Ernest Marcinko
KeymasterHi 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: http://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.
February 20, 2016 at 11:08 am #7754Donovanray
ParticipantHello 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 85ASo 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
February 22, 2016 at 12:49 pm #7763Ernest Marcinko
KeymasterHi!
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.
February 23, 2016 at 10:05 am #7770Donovanray
ParticipantHello Ernest,
That must probably be it. Thank you for your help!
Kind regards,
Erwin
-
AuthorPosts
- You must be logged in to reply to this topic.