Investigate exact-locale search results and reported duplicates

Aperta
#2,889 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@filiperochalopes ci sta già lavorando.

Dal 10/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

decision/human-review signal/low-risk signal/needs-access signal/well-specified stage/triaged type/docs

User story

As a CIEL Lab curator, I want locale-filtered searches to return names from only the selected locale so I can review the intended language without regional variants being mixed in.

Use case

When filtering for pt, a curator expects names with locale pt only, not pt_BR. The reported search also appears to show duplicates, which should be traced before changing behavior.

Requirements

  • Identify the search surface and query mode shown in the report.
  • Document the repository’s current and historical locale-matching decisions and the rationale actually supported by code, tests, commit history, or documentation; mark any rationale that remains unknown.
  • Determine whether the reported duplicates are repeated concept rows, repeated names within a concept, or an apparent duplication caused by locale-family inclusion.
  • Assess the requested exact-locale behavior (pt matches only pt; pt_BR remains a separate locale) against all affected search paths and identify the smallest follow-up change, if needed.
  • Do not change application behavior in this investigation; report findings before proposing implementation.

Acceptance criteria

  • Given the implicated search path, when traced, then the report names its caller, normalization and matching logic, and relevant tests.
  • Given repository history and comments, when the behavior decision is explained, then the documented reason is evidenced; missing rationale is explicitly stated as unknown rather than inferred.
  • Given the example from the report, when the duplicate symptom is investigated, then its type and cause are identified, or the specific additional evidence needed is documented.
  • The investigation produces a concise recommendation and no production data or application behavior is changed.

More details (collapsible)

Slack report and initial repository evidence

The Slack thread reports that searching Portuguese terms returns pt_BR and duplicates. A reply says the family behavior was intentional, but the author does not recall the reason.

In the MCP structured-filter path, filter_dsl.py intentionally treats a bare language locale as a family (pt matches pt and pt-br; a region-qualified locale is exact). The code comment and regression test frame this as useful for questions such as “no Portuguese translation.” The original feature commit (cc6b51c) introduces the behavior and test, but its commit message does not record a broader product rationale. Separately, CIEL’s canonical locale policy specifies pt_BR (not pt-BR).

MCP Qdrant search groups indexed points by concept ID and deduplicates name entries by normalized locale, name type, and value. This makes duplicate concepts/names less likely in that path but does not establish what the Slack screenshot shows. The attached screenshot and exact search surface still need review.

Source: https://openmrs.slack.com/archives/D087CPXRNDB/p1791568222333839

Lingua principale
Nessun dato sulla lingua
Stelle
4
Fork
2
Merge medio
2h 12m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenConceptLab/ocl_issues

Tutte le issue di OpenConceptLab/ocl_issues

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.