Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Blink Search Indexer

A lightweight WooCommerce companion plugin that builds a static JSON index of products and powers a client-side autocomplete dropdown for instant search. This document walks through the design decisions, folder structure, and known limitations so future iterations can follow the same reasoning.

blink-search-showcase

Project overview

  • Purpose – Provide a zero-dependency product search that feels instant and gracefully falls back to the default WooCommerce search results.
  • Approach – Generate a trimmed product index during cron/CRUD events, ship it to the browser, then filter/sort matches on the client.
  • Scope – Only parent products with public catalog visibility are indexed; variations remain discoverable via their parent listings.

Repository layout

blink-search-indexer/
├── blink-search-indexer.php   # Main plugin bootstrap and documentation-heavy logic
├── public/
│   ├── search.js              # Front-end behaviour and scoring helpers
│   └── search.css             # Default styling for the dropdown UI
├── LICENSE                    # GPLv3 license text
└── README.md                  # This file

Thought process & commentary highlights

The source code includes explanatory blocks that narrate the original intent:

  • blink-search-indexer.php documents when/why the index rebuilds, why a transient lock exists, and how the shortcode keeps forms accessible.
  • public/search.js reads like a mini design doc describing the scoring model, lazy loading strategy, and trade-offs around event listeners.
  • public/search.css carries inline notes clarifying the visual hierarchy and WooCommerce overrides bundled with the plugin.

Installation & usage

  1. Copy the blink-search-indexer directory into wp-content/plugins/.
  2. Activate "Blink Search Indexer" inside the WordPress admin.
  3. Add the [blink_search] shortcode anywhere you want the autocomplete box.
  4. (Optional) Override the default styles by dequeuing blink-search-css and adding your own CSS rules.

Styling notes

The public/search.css file controls the styles for the dropdown, empty state, and WooCommerce overrides. Because the CSS ships separately from the JavaScript you can override or replace it without forking the plugin.

Testing checklist

  • Trigger index rebuilds by saving a product or taxonomy term.
  • Confirm the dropdown suggestions appear after typing three or more characters.
  • Validate that the "See all results" link always points to the canonical search results page using the current query.

License & authorship

This project is distributed under the GNU General Public License v3.0 (see the included LICENSE file). Authored by Philip V. Jancsy; contributions are welcome so long as they remain compatible with GPLv3.

About

A simple WP search Plug-in for WooCommerce products.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages