=== Snappy Search ===
Contributors: polyplugins
Tags: instant search, search, wp, snappy search, woocommerce
Tested up to: 7.0
Stable tag: 1.7.1
Requires PHP: 7.4
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

A fast, lightweight search plugin powered by TNTSearch, indexing posts for near instant, accurate results.


== Description ==
[youtube https://www.youtube.com/watch?v=d4Z7vC8Xhec]

Snappy Search is a powerful and lightweight AJAX search plugin that enhances your site's search functionality with lightning fast results. Powered by [TNTSearch](https://github.com/teamtnt/tntsearch), it indexes your WordPress posts for near instant, accurate, and efficient searching. Say goodbye to slow searches, this plugin ensures a seamless user experience with improved relevancy. Perfect for blogs, news sites, and content heavy websites. For even faster search performance, install our [Snappy Search Standalone API](https://www.polyplugins.com/product/snappy-search-standalone-api/).

[Demo](https://demo.polyplugins.com)


== Currently Supports ==

* Searching WooCommerce products
* Searching Easy Digital Downloads downloads
* Searching WordPress posts
* Searching WordPress pages
* Searching through WooCommerce orders


== Features ==

* Search through various post types fast without requiring multiple page loads
* Popular search terms can be displayed below the search
* Define synonyms when there are multiple search terms that could be used
* Option to filter WooCommerce products by rating, price, or custom fields.
* Set how many characters to trigger the AJAX search
* Set a typing delay before an AJAX request is made
* Tab selection between various indexes if more than one is enabled
* Adds a dropdown by defined selector to search form to show results
* Can build indexes for products, downloads, posts, pages, orders
* Background sync for indexes
* Index updater that handles when data is added, updated, removed, set to draft, or visibility hidden.
* Ability to adjust the batch size for the initial index so smaller servers don't get overloaded
* Limit the number of results displayed
* Advanced search to replace the default WordPress search
* Add your own custom shortcode template by copying snappy-search-form.php to your theme folder
* Reindexer button
* Adds categories, product categories, tags, product tags, and custom fields (if used) to the index to help with more accurate results
* Shortcode [snappy_search_polyplugins placeholder="Search..."] to inject a Snappy Search form anywhere
* Shortcode [snappy_search_mobile_polyplugins] to inject a mobile Snappy Search form anywhere
* Shortcode [snappy_search_advanced_polyplugins] to inject an advanced Snappy Search form anywhere
* /wp-json/snappy-search/v1/products endpoint to get array of product ids (Requires WooCommerce)
* /wp-json/snappy-search/v1/downloads endpoint to get array of download ids (Requires EDD)
* /wp-json/snappy-search/v1/posts endpoint to get array of post ids
* /wp-json/snappy-search/v1/pages endpoint to get array of page ids


== Road Map ==

* Add analytics for 0 search items and other things
* Add scroll to load more results
* Add another shortcode for replacing advanced search

== Contributors ==
You can submit a PR via our [Github Repository](https://github.com/PolyPlugins/speedy-search)

== GDPR ==

We are not lawyers and always recommend doing your own compliance research into third party plugins, libraries, ect, as we've seen other plugins not be in compliance with these regulations.

This plugin uses the Bootstrap, BootStrap Icons, and SweetAlert2 3rd party libraries. These libraries are loaded locally to be compliant with data protection regulations. This plugin also uses TNTSearch.

This plugin collects and stores certain data on your server to ensure proper functionality. This includes:

* Storing plugin settings
* Remembering which notices have been dismissed
* Storing search terms made by users when enabled


== Installation ==

1. Backup WordPress
1. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
1. Activate the plugin through the 'Plugins' screen in WordPress
1. Configure the plugin


== Frequently Asked Questions ==

= How long will it take to index? =

By default it will index 10 posts per minute.


== Screenshots ==

1. Demo
2. General Settings
3. Popular Settings
4. Synonyms Settings
5. Exclusions Settings
6. Posts Settings
7. Pages Settings
8. Products Settings
9. Orders Settings
10. Indexing Settings
11. Filters Settings
12. Advanced Search Settings
13. Product Excluded Search Terms Settings


== Changelog ==

= 1.7.1 =
* Bugfix: Unable to save after fresh install

= 1.7.0 =
* Added: Ability to only show results with title matches
* Added: Boolean Search which will treat the search terms as "AND" instead of "OR"
* Added: Indexing settings to disable various fields from being indexed
* Added: Option to sort top selling products to the top
* Added: Sort by rating setting
* Added: Option to disable sorting featured to top and removing the featured badge if disabled
* Added: Post author indexing
* Added: Filtering by product category
* Added: Product filters for attributes
* Added: Logging Class
* Added: Exclusions functionality to exclude results when a search contains certain terms.
* Added: WooCommerce Excluded Search Terms to remove specific products under certain search terms
* Added: CLI Reindexer
* Updated: Ordering of Custom Product Fields to be by the order specified in settings to match attribute filter sorting.
* Updated: Settings Saved style
* Updated: Synonym icon
* Updated: API to pull product pricing using the product object so filters will be able to modify it.
* Bugfix: If advanced filter is used with existing Snappy Search (like in header) it would show both
* Bugfix: Filters not showing on advanced search

= 1.6.0 =
* Added: Handling for standalone Snappy Search API for huge speed increases
* Added: A crossfade transition for result updates when using the custom standalone Snappy Search API, making fast responses feel smoother and more instant.
* Added: Initial loader so when users click into search it shows results for the latest posts, products, ect.
* Added: Synonym functionality
* Added: Sorting title matches to top
* Added: Rating, Price Range, and Custom Product Field filters for products
* Added: Star ratings to product tab
* Added: Add to Cart / Select Options button to products tab
* Added: Option to filter out of stock products to end of list
* Added: Out of Stock badges on product tab
* Added: Featured functionality to move featured products to top of list and show a featured badge on product tab
* Added: Singular endpoint to fetch all posts, pages, ect to reduce the number of requests per search
* Added: Handling to clear cache when a product goes out of stock
* Added: Handling clearing cache when posts, products, ect are updated / deleted
* Added: Handling for when a products visibility is set to hidden
* Added: Suffixes to global variables
* Added: Notice in settings when no object cache is detected
* Added: Handling for indexing categories and tags
* Added: Handling for indexing product categories, product tags, and custom fields if applicable
* Updated: TNTSearch to latest version
* Bugfix: Indexing can fail if using page builders due to long text strings
* Bugfix: Indexing can fail on orders
* Bugfix: Order search not working on non HPOS installs
* Bugfix: Extra columns on orders from other plugins shift the layout, added Unavailable messaging to take it's place
* Bugfix: Popular searches not populating when enabled
* Removed: Popular search text to allow for more badges
* Removed: Advanced WordPress Repo Search due to lack of interest

= 1.5.2 =
* Bugfix: WooCommerce orders admin will sometimes close if opened in new tab
* Bugfix: Searching orders will fail if orders were not indexed

= 1.5.1 =
* Added: Custom tokenizer for future use
* Updated: Product indexing to handle SKUs with and without dashes.
* Updated: TNTSearch from 5.0.1 to 5.0.2
* Bugfix: Reindex will fail if you change available indexes

= 1.5.0 =
* Added: Snappy Search to WooCommerce orders
* Added: Order indexing
* Added: Setting for order enabled
* Added: Setting for order batch
* Added: Setting for order result limit
* Added: Advanced Stacked Template so tabs don't have to be used on the advanced search page, this puts posts and pages above products unless reordered in the settings
* Added: Default result type setting to pick which results to show first
* Added: Tab enabled setting to have the ability to not show tabs or perform queries for those types
* Added: Rating for products
* Added: Submenu options under Snappy Search admin sidebar
* Added: Ability to jump to various tabs from the admin sidebar
* Added: Ability to jump back to previously saved tab instead of always going to general tab after saving
* Added: Logic for when switching to MySQL it disables switching back to SQLite
* Added: Notice for deactivating Snappy Search due to using SQLite.
* Optimized: Admin setting field logic into it's own field classes.

= 1.4.3 =
* Bugfix: Updating index triggering error
* Bugfix: Advanced search malfunctioning, switched to page templates to resolve issues

= 1.4.2 =
* Bugfix: No search results error when directly visiting advanced search page

= 1.4.1 =
* Bugfix: Advanced search styling max height
* Bugfix: Flush rewrite rules not working correctly.
* Bugfix: Advanced Search template override not working.
* Bugfix: Title changes can conflict with menus
* Bugfix: Entire search result not selectable

= 1.4.0 =
* Added: Advanced Search to replace default search when pressing enter if enabled and not indexing
* Added: Advanced Search enabled, title, and placeholder settings
* Added: Template snappy-search-advanced-search-form.php
* Updated: Search form templates to take advantage of advanced search
* Updated: Translations
* Bugfix: Indexer looping through the same results if failed
* Deprecated: SQLite

= 1.3.1 =
* Bugfix: Jumping that happens when initially searching

= 1.3.0 =
* Added: Support for using the WP DB instead of SQLite since TNTSearch supports it
* Added: Database type setting
* Added: Shortcode [snappy_search_mobile_polyplugins] in case of needing another search form for mobile
* Added: Shortcode [snappy_search_advanced_polyplugins] for replacing advanced search
* Added: Better handling for indexing fallback
* Added: Skeleton loader
* Added: Initial loading indicator
* Added: Additional styling
* Updated: Fall back to default WordPress search when indexing
* Updated: Translations
* Bugfix: If using multiple search forms, only the first one works
* Optimized: Indexing logic

= 1.2.0 =
* Added: Custom template for shortcode search so the layout can be changed. Add your own custom template by copying snappy-search-form.php to your theme folder
* Added: Popular searches that display under the search form
* Added: Popular search enable setting
* Added: Popular search limit setting to only show top X number of popular search terms below the form
* Added: Popular days setting for the number of days of search term history to look through for popular search terms
* Added: Popular tracking delay setting to handle triggering tracking search after it's been completed, this must be larger than typing delay
* Added: Popular search character setting for preventing non words from showing in popular search terms
* Added: Popular result count setting to prevent search terms with no or low results from showing
* Added: Popular blacklist setting to block specific search terms from showing as popular
* Added: Cron that cleans up popular searches table based on number of days for a search term to be considered popular
* Added: Handling for creating the new popular search term table
* Added: Max character setting under general to limit the length of search terms
* Updated: Endpoint names with old endpoints still being accessible, but they will be removed in the future, so please update references if you are using them outside of this plugin
* Updated: TNTSearch to 5.0.1
* Updated: Translations
* Moved: Activation logic to it's own classes
* Moved: Snappy Search settings to top level

= 1.1.0 =
* Added: Support for WooCommerce Products
* Added: Support for Easy Digital Downloads
* Added: Support for Pages
* Added: Shortcode [snappy_search_polyplugins] to inject a Snappy Search form anywhere
* Added: Index updater that handles when data is added, updated, removed, set to draft, or visibility hidden.
* Added: Reindex button to settings
* Added: Characters and Typing Delay options under General settings
* Added: Enabled option under various index types
* Added: Tab navigation to search if showing more than one index
* Updated: Name to Snappy Search
* Bugfix: Cron jobs may not register during activation

= 1.0.1 =
* Added: Repo Advanced Search

= 1.0.0 =
* Initial Release