Skip to content

Evaluate GLEIF autocompletions endpoint to reduce name-search misses #27

Description

@StephenAbbott

Summary

Company-name search currently uses GLEIF's filter[fulltext] on /api/v1/lei-records. GLEIF also exposes a dedicated autocompletions endpoint:

https://api.gleif.org/api/v1/autocompletions?field=fulltext&q=<name>

which searches across the entire LEI record — not just legalName, but other names, transliterations, previous names — and is likely a superset of the current search. Anecdotally, the current search can miss entities when the user types a trading name or a transliterated form.

Task

  1. Build a small comparison harness (a script in backend/scripts/ is fine): for a fixed set of ~50 real-world queries (legal names, trading names, transliterations, typos), hit both endpoints and compare hit@1 / hit@5 for the expected LEI.
  2. If autocompletions wins meaningfully, switch or blend the name-search path in backend/opencheck/sources/gleif.py — keeping response-shape differences in mind (autocompletions returns suggestion objects, not full LEI records; a follow-up record fetch may be needed).
  3. Watch rate limits — GLEIF's public API is generous but this endpoint may behave differently under load.

References

  • GLEIF API docs: https://documenter.getpostman.com/view/7679680/SVYrrxuU?version=latest
  • Current name search: backend/opencheck/sources/gleif.py (fulltext filter path); tests in backend/tests/.
  • There is an opt-in live smoke tier (backend/tests/test_live_smoke.py, pytest --run-live -m live) that hits the real GLEIF API — a good place for a couple of guard tests if the search path changes.

No API key needed; entirely self-contained — a good first contribution touching one adapter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions