---
# System prepended metadata

title: Product search fix

---

# Product search fix
## Context

Due to Elasticsearch deletion, we currently face of performance issue while calling  /pos/products/search route. Some fixes have been done but we loose some part of the functionnal scope.

## Needs

We needs to be able to search a product with following fields :
* label
* ref
* external ref
* barcode

## DB structure

We made a POC and full text search is only one possible solution to match performance requirements :

[https://www.w3resource.com/mysql/mysql-full-text-search-functions.php](https://www.w3resource.com/mysql/mysql-full-text-search-functions.php)

## Optimizations

- Limit to 50 results
- Response time ≤= 2s

## Tests

Use DB with 300k+ (Decathlon DB)