=== SpotFind Fast Search for WooCommerce ===
Contributors: star2727
Tags: woocommerce, search, product search, instant search, ajax search
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.8.1
License: GPLv2 or later
Requires Plugins: woocommerce

Instant WooCommerce product search from a static index. Loads nothing until a visitor uses the search box. Typo fix, synonyms, sale prices, voice.

== Description ==

Made by [Flying Star](https://flyingstar.in/), a WordPress and WooCommerce studio in India. Built by [Niral Sura](https://niralsura.com/). SpotFind is our own search plugin: fast, on your own server, no third-party service.

SpotFind keeps one row per product in its own table, builds a small search file from it, and lets the visitor's browser search that file locally. Typing never wakes PHP or the database.

**Built so it cannot slow your site**

* Before anyone touches a search box the plugin adds one 1.2 KB inline script and makes no request. No stylesheet, no script file.
* The first click or focus loads the app. Parsing and searching run in a Web Worker, so the page stays responsive.
* Visitors never trigger an index rebuild. Rebuilds run in the background, one at a time, with a lock, a time limit and a memory raise.
* A product save is never blocked: if SpotFind fails, the error is logged and the save carries on.
* Index files have versioned names and are served with a one-year cache header (Apache and LiteSpeed).
* Emergency switch: `define( 'SPOTFIND_DISABLE', true );` in wp-config.php.

**Search**

* Typo correction ("cannon" finds Canon)
* Model numbers ("a7 iv" finds "A7IV")
* Accessories rank below the product they are made for
* Matching name and brand outranks a name-only mention
* Synonyms you define
* Best sellers and in-stock products rank higher
* Category and brand rows, recent searches, popular products
* Sale price with the regular price struck through and % off
* Optional voice search (browser speech recognition)
* Works with any theme: it attaches to the existing search box, wherever it sits (header, sidebar, mobile menu, pop-up, block editor Search block)
* Put a search box anywhere with the shortcode [spotfind_search], or point SpotFind at a search box with a CSS selector
* The "See all results" page uses your theme's own product grid, ranked by the same engine

**Looks**

* Match my theme (default): reads the search box's own font, corners and colours, so the dropdown looks like part of your theme with no setup
* Glass: a frosted, Apple-style panel that picks light or dark from the page behind the search box. The blur runs on the open panel only and falls back to a solid panel when the visitor asks for less transparency
* Presets: Light, Dark, follow the visitor's device, High contrast
* Category and brand chips, sale badges, keyboard hints
* Accent colour, corner radius, comfortable or compact rows
* Keyboard and screen reader friendly, respects reduced motion

**SpotFind Pro**

Pro is a separate plugin from [Flying Star](https://spotfind.flyingstar.in/) that adds to this one. The free plugin keeps its full search engine, with no product limit.

* Search analytics: top searches, searches that found nothing, click rate. Costs nothing while typing: the browser sends one small message when the visitor leaves, and the totals are saved every 15 minutes. One click deletes every record.
* Add a synonym straight from a search that found nothing
* Pin, boost or bury products for a search, with a product finder
* Redirects: "returns" goes to your returns page
* Leave categories and products out of search, and pick which fields are searched
* Rebuild only at night, wait out product imports, switch search off on chosen pages
* Filters on the results page: in stock, price range and brand
* Search variation SKUs and options such as size and colour
* Updates from your WordPress dashboard

Learn more and get Pro at [spotfind.flyingstar.in](https://spotfind.flyingstar.in/).

**Its own table**

SpotFind stores products in `{prefix}spotfind_items`, never in posts or postmeta, and never searches them either. When a product is added, edited, trashed or its stock changes, only that product's row is updated. A daily resync repairs anything changed behind WordPress's back. Settings, Maintenance shows the table size and has Optimise, Resync and Rebuild buttons. Uninstalling drops the table.

WP-CLI: `wp spotfind sync`, `wp spotfind rebuild [--sync]`.

Prices and stock in the dropdown are as of the last rebuild.

== Privacy ==

Searching sends nothing to any server. If voice search is on, the visitor's browser sends the spoken audio to its own speech service (Google for Chrome, Apple for Safari). Turn the microphone off in Settings, SpotFind.

== Screenshots ==

1. The search box in a store header. Results appear as you type, with highlights, sale prices and stock.
2. A typo still finds the product, and the box says what it searched for.
3. Brand and category suggestions sit above the matching products.
4. The same box on a phone.
5. Overview: products indexed, file sizes and build time.
6. Appearance: match your theme or pick a style.
7. Dropdown: what the results show, voice search and synonyms.
8. Speed: choose when the search file is rebuilt.

== Changelog ==

= 0.8.1 =
Fixed the Overview showing NaN for file sizes above 1,000 KB on large catalogues.
Fixed PHP notices on a fresh install before the settings were first saved.
Fixed search failing on a page cached before a rebuild: the previous index is now kept for one more build.
Fixed accented letters typed in the search box not matching products, for example "cafe" and "café".

= 0.8.0 =
Renamed to SpotFind. Your settings and index do not carry over from the old name, so run Rebuild once after updating.

= 0.7.5 =
The dropdown now stays above full-screen search pop-ups, such as the Kadence header search.

= 0.7.4 =
A banner on the settings screen when a newer version is ready, with an Update now button.

= 0.7.3 =
A hook, spotfind_results_ids, lets add-ons narrow the ranked results page. No change for visitors.

= 0.7.2 =
New option, Out of stock products: show them like any other product, show them after in-stock ones (as before), or hide them. The default is unchanged.

= 0.7.1 =
Product site moved to spotfind.flyingstar.in. Links updated. No change for visitors.

= 0.7.0 =
A SpotFind item in the admin menu. A "?" guide on every option. A [spotfind_search] shortcode and an option for other search boxes. Search numbers from Pro also show on the Overview.

= 0.6.3 =
Flying Star credit in the plugin details and on the settings screen. No change for visitors.

= 0.6.2 =
New logo and settings screen artwork.

= 0.6.0 =
Renamed to SpotFind. New logo. The dropdown now matches your theme by default (Glass is one click away).

= 0.5.1 =
New settings screen: tabs, switches, theme previews, big status numbers. New logo.

= 0.5.0 =
Extension points for add-ons: filters for index rows, rebuild time, front-end switch and loader config; an action after each build; an optional add-on script on the search box. No change for sites without an add-on.

= 0.4.0 =
Own table with per-product updates, maintenance panel, lazy loading with a Web Worker, themes and presets, sale prices, load-reduction settings, product cards in chunks for big catalogues.

= 0.2.0 =
Settings page, synonyms, accessories ranked below main products, ranked results page.

= 0.1.0 =
First version.
