Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › implode error message / no scrollbar / unwanted white line › Reply To: implode error message / no scrollbar / unwanted white line
1. Well, after suffering and pain I found out that there is an error in the wordpress documentation, and one of the arguments to one of the functions related to this feature is not working as expected. I had to change a few things to make it work correctly. It should show the same items as on the ajax search result list. This “bugfix” is definitely going into the next update.
2. Nice job!
3. Yea, that's a “Catch-22” type of situation. Let me explain. So, the search query is limited to a certain number of results, in your case it's 16. The actual query forwarded to the database is limited to this number – the reason is maximizing performance – thus it's impossible to tell how many results actually match the query, since the database only returns at most the 16 most relevant ones.
However, to tell how many results do match the query, the limit must be eleminated on database level, but here is the catch: removing the limit creates a huge performance issue on larger databases – because the database server wont stop the operation until checked every possible match. For example: imagine a database with 20 000 posts. The user types in something that matches ~10 000 rows. If the limit is set, the query stops at 16 rows, no others are examined. If however there is no limit, it will return all the 10k rows, and to match them, it must examine each and every row. In terms of performance it's going to be approx. 10000/16 = 625 times slower in the worst case scenario. It's bit more complicated than this, but you get the picture I guess 😉
As for the suggestions:
1. Duplication is already implemented (yay!) in the upcoming version. Export/import is also being developed.
2. That actually sounds great.Best,
If you like my products, don't forget to rate them on codecanyon :)