Double quote recognition, infinite scroll, database cache and major optimizations. This post will sum up the most important changes from versions 4.13.2 to 4.14.1.
Infinite scroll on ‘show more’ results
Took us a while, but it is finally here with a stable release. A new visibility detection method was implemented, to detect various scrolling methods as well as certain element visibilities to make this feature possible. Big ups for Mudit Ameta for his isInViewport script, it is by far the greates solution out there, at this time.
By deafult this feature is enabled, if the ‘Show more results’ feature is enabled and set to ‘Load more ajax results’.
Double quotes and logic changes
Text between “double quotes” is now treated as an exact match, just like how Google search works. The words between the quotes are not separated, but queried as-is.
With this feature we enrolled a major optimization on the regular search queries (post, taxonomy term, user etc..), so that keywords in seaprate fields can be compared by the search logic – this was not possible before without using the index table engine. For example: We search for ‘hello world’ with the default AND search logic and the regular engine. A post, that contains ‘hello’ in the title and ‘world’ in it’s content is now a match – before this was not a match.
Results Cache method: database
Until now, only file cache was possible for search queries. We added an option to use the database for this purpose as well. The plugin will use the wp_options table, as it is pretty much optimal for this task. Don’t worry, old queries are regularly deleted, to prevent the table from cluttering.
Smoother scrolling, pagination and item loading
The scroll script for the vertical and horizontal results has been tweaked for lower delay on the animations, as well as soother handling of large number of elements. The isotopic layout pagination and overall performance had been improved – adding new elements now does not require the whole container to re-initialize, which looks much smoother and performs better across all devices.
The mobile keyboard now automatically closes whenever the results box opens at the first time. For subsequent queries, the keyboard is retained, until the results box is closed again, or the page is refreshed. This should feel much more smooth, and similar to major search behaviours.
While the front-end was fully translatable, and supporting string tranlsations as well, the back-end localization was long overdue. Now, the whole plugin back-end was made translation ready, and the localization .pot file can be found under the languages directory within the plugin path.
- Removed unused files and classes, saving ~1MB of data unzipped
- Better trimming inline script and stylesheet contents from the results
- Some 3rd party scripts were updated and optimized
- Shortcode extraction improvements
- ..and many more
Do you have a copy of Ajax Search Pro yet?
Latest posts by Ernest Marcinko (see all)
- 10 000 - October 30, 2018
- Ajax Search Pro for WordPress 4.13.2 to 4.14.1 developer notes - October 9, 2018
- Ajax Search Pro for WordPress v4.13.1 – developer notes - June 28, 2018