lumnik. / scénarios Tous les scénarios · English

Chercher dans 40 000 articles avec les facettes dans la PWA

Objectif Trouver un article par ses mots ou le début de sa référence, et affiner par catégorie, dans la PWA.

Deux exports CSV, une entité, un SearchIndex, une app réduite à la recherche.

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

Limites

  • Recherche par mots et préfixes; pas de recherche sémantique.
  • Pas d'onglet Recherche sans fournisseur Search (édition Pro).
  • spec.tabs choisit la navigation; les droits restent ceux du hub.
  • Données synthétiques.

Catalogue · recherche

Un vendeur cherche une pompe.

Par un mot, ou le début d'une référence.

Puis il affine par catégorie ou par statut.

Catalogue synthétique

Le problème

Un filtre exact ne trouve pas un mot.

  • La référence est longue.
  • La description est en texte libre.
  • La catégorie est dans un autre fichier.

Rien n'est modifié

Deux exports CSV, tels quels.

  • Une entité joint la catégorie.
  • Un SearchIndex déclare ce qui se cherche.
  • Aucune application à développer.

Ce qu'il a fallu écrire

kind: SearchIndex

Les colonnes indexées et leur mode.

Le scénario complet tient en 5 fichiers de déclaration, 96 lignes.

Ce que voit le vendeur

«Pompes»: 7 407 articles.

  • Facette catégorie: Pompes.
  • Facette statut: 6 761 actifs, 646 inactifs.
  • «Pompe Badu»: 1 286, dont 122 inactifs.

Rejeu du 3 novembre 2026; captures du 21 octobre.

Qui voit quoi

La recherche reste dans son périmètre.

  • L'app cherche dans le scope pwa-search.
  • spec.tabs choisit la navigation.
  • Les droits restent ceux du hub.

La limite

Des mots et des préfixes, pas du sens.

  • Pas de recherche sémantique.
  • Il faut un fournisseur Search: édition Pro.
  • Données synthétiques.

Essayer

Le scénario se rejoue de bout en bout.

CSV, entité, index, app: chaque étape est publiée avec sa sortie.

Ce scénario demande lumnik Pro.

Voir l'offre →