# Search & Filtering

Finding the right products quickly is essential for efficient point-of-sale operations. WCPOS provides powerful search and filtering capabilities to help you locate products instantly, even with large inventories.

![Product search and filtering interface](/img/product-search-and-filtering.png)

Product search and filtering interface in WCPOS

## Product Search[​](#product-search "Direct link to Product Search")

### Unified Search Field[​](#unified-search-field "Direct link to Unified Search Field")

WCPOS features a single search field that simultaneously searches across multiple product attributes:

* **Product Name** - Searches the product title and description
* **SKU** - Matches product postmeta `_sku` field
* **Barcode** - Searches the configured barcode field, which defaults to WooCommerce's GTIN field `_global_unique_id` and can be changed to `_sku` or any custom postmeta key in [Settings](/settings/wp-admin/general.md#barcode-field).

Simply type your search term into the "Search Products" field, and the POS will instantly filter results across all these fields.

### Tokenized Search Technology[​](#tokenized-search-technology "Direct link to Tokenized Search Technology")

The search functionality uses the [FlexSearch library](https://github.com/nextapps-de/flexsearch) with advanced tokenization capabilities:

* **Substring Matching** - Finds your term anywhere inside a word (e.g., searching "berry" finds "blueberry")
* **Performance Optimized** - Uses a performance preset for fast search results
* **Language Aware** - Adapts to your store's configured language
* **Lazy Initialization** - Optimizes memory usage by loading search indexes only when needed

Search terms need at least 3 characters

From v1.10.0, search matches substrings **inside** words — "berry" finds "blueberry", and "saippua" finds "Kuorintasaippua". The trade-off is a minimum term length: queries shorter than **3 characters** aren't matched against the text index. Short codes still work through the barcode and SKU lookups.

Before v1.10.0, matching was prefix-only (search found the start of a word, never the middle).

### How Search Works[​](#how-search-works "Direct link to How Search Works")

When you type in the search field, the POS:

1. **Tokenizes** your input into searchable terms
2. **Searches locally** stored product data first for instant results
3. **Queries the server** for the matching products if they aren't local yet, and stores them so the same search is instant next time
4. **Updates results** in real-time as you type

Search fetches what you searched for — the rest of your catalogue downloads through the background seed (see [Product Synchronisation](/products/sync.md)), so search stays fast without pulling unrelated data.

## Product Filtering[​](#product-filtering "Direct link to Product Filtering")

### Filter Bar[​](#filter-bar "Direct link to Filter Bar")

Below the search field, you'll find interactive filter toggles and dropdown menus that allow you to narrow down products by specific criteria.

### Available Filters[​](#available-filters "Direct link to Available Filters")

#### Stock Status[​](#stock-status "Direct link to Stock Status")

Filter products based on their inventory status:

* **In Stock** - Products with available inventory
* **Out of Stock** - Products with zero inventory
* **Backorder** - Products available for backorder

#### Featured Products[​](#featured-products "Direct link to Featured Products")

Toggle to show only products marked as "Featured" in your WooCommerce store.

#### On Sale Products[​](#on-sale-products "Direct link to On Sale Products")

Filter to display only products currently on sale or with active discounts.

#### Category[​](#category "Direct link to Category")

Use the category dropdown to filter products by their assigned product categories. This helps you quickly find products within specific departments or product lines.

#### Tag[​](#tag "Direct link to Tag")

Filter by product tags to find items with specific attributes or characteristics you've defined in your WooCommerce store.

### Using Filters[​](#using-filters "Direct link to Using Filters")

* **Toggle Filters** - Click any filter button to activate it (active filters appear highlighted)
* **Multiple Filters** - You can combine multiple filters to narrow your search further
* **Clear Filters** - Click an active filter again to deactivate it
* **Search + Filter** - Use filters together with the search field for precise product location

## Barcode Configuration[​](#barcode-configuration "Direct link to Barcode Configuration")

### Search Fields[​](#search-fields "Direct link to Search Fields")

The search functionality automatically includes your configured barcode field. The barcode field used for searching depends on your POS settings configuration.

## F.A.Q.[​](#faq "Direct link to F.A.Q.")

What is the \_global\_unique\_id field for barcodes?

The `_global_unique_id` field is the GTIN field WooCommerce added to provide better barcode standardization across stores. It is the **default** barcode field in WCPOS.

**Key Points:**

* **Modern Standard**: This field was designed specifically for global barcode identification (GTIN / UPC / EAN)
* **Default**: The POS uses `_global_unique_id` as the barcode field out of the box; you can switch it to `_sku` or any custom meta field in the settings
* **Flexibility**: You can configure any product meta field as your barcode field if you're using third-party barcode plugins
* **One field per product**: The POS searches a single configured barcode field, and WooCommerce stores one barcode value per product (or per variation). If you need multiple codes on a product, store them in a custom field and point the barcode setting at it
* **Rebuilds on change**: Changing the barcode field rebuilds the local catalogue's barcode index, so scans immediately match the newly selected field

To configure which field the POS uses for barcodes, visit your POS settings in the WordPress admin area.

Why don't I see all my products when I search?

The background catalogue seed may not have finished yet. If you don't see a product:

1. **Search for it** - This fetches the matching products from your server directly if they aren't local yet
2. **Check download progress** - **Store health → Database** shows how much of your catalogue is on this device
3. **Check its visibility** - Out-of-stock products are hidden by default, and only standard WooCommerce product types are supported

Learn more in our [Product Synchronisation](/products/sync.md) guide.

Can I search for partial product names or SKUs?

Yes! The tokenized search matches substrings, which means:

* Searching "blue" will find products with "blueberry", "blue shirt", etc.
* Searching "berry" will also find "blueberry" — the term can appear anywhere in the word
* Searching "ABC" will find SKUs like "ABC123", "ABC-XYZ", etc.
* You don't need to type complete words or codes (but terms shorter than 3 characters aren't matched)

The search is designed to find products quickly with minimal typing.
