lumnik. / scenarios All scenarios · Français

Search 40,000 items with facets in the PWA

Goal Find an item by its words or the start of its reference, and narrow by category, in the PWA.

Two CSV exports, one entity, a SearchIndex, an app reduced to search.

manifests/10-products.yaml
apiVersion: connectors.lumnik.io/v1kind: Connectormetadata:  name: pwa-search-products  connector_type: csv-file  scopes: [pwa-search]spec:  transport:    kind: local    path: /tmp/lumnik-scenario/pwa_search/m_product.csv  parser:    has_header: true  after_process: none
manifests/15-product-categories.yaml
apiVersion: connectors.lumnik.io/v1kind: Connectormetadata:  name: pwa-search-product-categories  connector_type: csv-file  scopes: [pwa-search]spec:  transport:    kind: local    path: /tmp/lumnik-scenario/pwa_search/m_product_category.csv  parser:    has_header: true  after_process: none
manifests/20-product.yaml
kind: Entityname: PwaSearchProductlabel: Article du cataloguedescription: "Articles du catalogue, enrichis avec leur catégorie. Une ligne représente un article."match: [product_id]scopes: [pwa-search]columns:  product_id:    label: "Identifiant de l'article"  category_id:    label: "Identifiant de la catégorie"  category_name:    label: "Catégorie"  category_description:    label: "Description de la catégorie"  reference:    label: "Référence"  description:    label: "Description"  active:    label: "Actif"sources:  - table: t_pwa_search_products    map:      m_product_id: product_id      m_product_category_id: category_id      name: reference      description: description      isactive: activejoins:  - table: t_pwa_search_product_categories    from: category_id    to: m_product_category_id    map:      name: category_name      description: category_description
manifests/30-product-search.yaml
apiVersion: search.lumnik.io/v1kind: SearchIndexmetadata:  name: pwa-search-productsspec:  entity: PwaSearchProduct  titleField: reference  language: french  fields:    - name: reference      match: prefix    - name: description      match: text    - name: category_name      match: text      facet: true    - name: active      facet: true  links:    - field: reference      url: "https://erp.example.com/articles/{reference}"
manifests/40-pwa-search-app.yaml
apiVersion: apps.lumnik.io/v1kind: Appmetadata:  name: pwa-searchspec:  title: Catalogue produits  scope: pwa-search  icon: generic  theme:    accentColor: "#4fd1a5"    backgroundColor: "#f4f1ea"  tabs: [search]  default: false
$ lm search query "Pompe Badu" --entity PwaSearchProduct --limit 5
ENTITY            KEY                 SCORE  MATCH
PwaSearchProduct  product_id=872758   0.19   category_name=*Pompes* | description=*Pompe* *Badu* Eco 50 750 W comprenant *pompe*, préfiltre et… | active=Y | reference=3273765
PwaSearchProduct  product_id=726711   0.19   category_name=*Pompes* | description=*Pompe* *Badu* Prime 25 10 m3/h comprenant *pompe*, préfiltr… | active=Y | reference=85217
PwaSearchProduct  product_id=246675   0.19   category_name=*Pompes* | description=*Pompe* *Badu* Gamma 50 14 m3/h comprenant *pompe*, prefiltr… | active=N | reference=2817768846
PwaSearchProduct  product_id=894895   0.18   category_name=*Pompes* | description=*POMPE* *BADU* ECO 30 3 CV TRI COMPRENANT *POMPE*, PREFILTRE… | active=Y | reference=24628F8495
PwaSearchProduct  product_id=1041861  0.18   category_name=*Pompes* | description=*Pompe* *Badu* Gamma 30 18 m3/h (SPECK) | active=Y | reference=750505

facets:
active          N (122)  Y (1164)
category_name   Pompes (1286)

5 hits shown · as of 2026-11-03 21:56
more: lm search query 'Pompe Badu' --entity PwaSearchProduct --limit 5 --cursor eyJzY29yZSI6MC4xNzU5NDcyNDg5MzU2OTk0Niwic2VhcmNoSW5kZXgiOiJwd2Etc2VhcmNoLXByb2R1Y3RzIiwiZG9jdW1lbnRJZCI6IjF8NzoxMDQxODYxIiwiZmluZ2VycHJpbnQiOiJzaGEyNTY6Yjg1YzgzOTlkYTQ2NDMzM2QwYTg0YWRlOTE1NWU1MzRjMTk3MTgwMWZjYTYxOWI5YmNhYTE0ODU0MDM1NmQ2MiIsImVsaWdpYmxlIjp7InB3YS1zZWFyY2gtcHJvZHVjdHMiOjg3fX0

$ lm search query Pompes --entity PwaSearchProduct --facet category_name=Pompes --limit 5
ENTITY            KEY                 SCORE  MATCH
PwaSearchProduct  product_id=1013923  0.08   category_name=*Pompes* | description=*Pompe* Delta 860 1 cv Tri bleu comprenant *pompe*, préfiltr… | active=Y | reference=7376.237.777
PwaSearchProduct  product_id=921312   0.08   category_name=*Pompes* | description=Corps de *pompe* Aqua 830 35 W comprenant *pompe*, prefiltre… | active=Y | reference=9737421605
PwaSearchProduct  product_id=894895   0.08   category_name=*Pompes* | description=*POMPE* BADU ECO 30 3 CV TRI COMPRENANT *POMPE*, PREFILTRE E… | active=Y | reference=24628F8495
PwaSearchProduct  product_id=872758   0.08   category_name=*Pompes* | description=*Pompe* Badu Eco 50 750 W comprenant *pompe*, préfiltre et v… | active=Y | reference=3273765
PwaSearchProduct  product_id=726711   0.08   category_name=*Pompes* | description=*Pompe* Badu Prime 25 10 m3/h comprenant *pompe*, préfiltre … | active=Y | reference=85217

facets:
active          N (646)  Y (6761)
category_name   Pompes (7407)

5 hits shown · as of 2026-11-03 21:56
more: lm search query Pompes --entity PwaSearchProduct --facet 'category_name=Pompes' --limit 5 --cursor eyJzY29yZSI6MC4wODI3NDU2MzQwMTkzNzQ4NSwic2VhcmNoSW5kZXgiOiJwd2Etc2VhcmNoLXByb2R1Y3RzIiwiZG9jdW1lbnRJZCI6IjF8Njo3MjY3MTEiLCJmaW5nZXJwcmludCI6InNoYTI1NjozM2Q0ZTg2NjdjYzQ5YjU0YzA5ZDQzNjk2NGFkZWVmYjAwNmNmMGU0ZDkxN2QxMGQ0ZjljNjdhNWVhMTBhZTViIiwiZWxpZ2libGUiOnsicHdhLXNlYXJjaC1wcm9kdWN0cyI6ODd9fQ

Limits

  • Word and prefix search; no semantic search.
  • No Search tab without a Search provider (Pro edition).
  • spec.tabs picks the navigation; access rights stay the hub's.
  • Synthetic data.
  • The data and the PWA are French: the screenshots show the app as a French user sees it.

Catalogue · search

A salesperson looks for a pump.

By a word, or the start of a reference.

Then narrows by category or status.

Synthetic catalogue

The problem

An exact filter does not find a word.

  • The reference is long.
  • The description is in French.
  • The category sits in another file.

Nothing is changed

Two CSV exports, as they are.

  • An entity joins the category.
  • A SearchIndex declares what is searched.
  • No application to build.

What had to be written

kind: SearchIndex

The indexed columns and their mode.

A 96-line scenario, five declaration files.

What the salesperson sees

"Pompes": 7,407 items.

  • Category facet: Pompes.
  • Status facet: 6,761 active, 646 inactive.
  • "Pompe Badu": 1,286, 122 inactive.

Replay of 3 November 2026; screenshots of 21 October.

Who sees what

Search stays in its scope.

  • The app searches the pwa-search scope.
  • spec.tabs picks the navigation.
  • Rights remain the hub's.

The limit

Words and prefixes, not meaning.

  • No semantic search.
  • It needs a Search provider: Pro edition.
  • Synthetic data.

Try it

The scenario replays end to end.

CSV, entity, index, app: every step is published with its output.

This scenario needs lumnik Pro.

See the editions →