Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. Helping People Find Records
Python & Django

Helping People Find Records

Search inside a Django application in stages: simple matching for a few thousand records, full-text search beyond that, semantic search where needed.

Updated 2 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

Simple matching works to a few thousand records. Beyond that use your database's full-text search, and consider semantic search only where meaning genuinely matters.

Start simple

For a few thousand records, matching against a handful of indexed fields is adequate and requires no additional infrastructure. Do not reach for a search engine before you need one.

Adding a dedicated search service to an application with four thousand records is adding an operational dependency for a problem you do not have.

What people actually search for

  • Reference numbers — exact matching, must work
  • Names, frequently misspelled or partial
  • Phone numbers and postcodes in inconsistent formats
  • Words from a description or note
  • Combinations of the above

Reference numbers are the most common and the most likely to be handled badly by a general search that tokenises them.

Normalise before matching

  1. Strip spaces and punctuation from reference numbers and phone numbers
  2. Match case-insensitively
  3. Handle partial matches on names
  4. Search several fields, weighted by relevance
  5. Return the most likely first, not the most recent

Scale in stages

VolumeApproach
Under a few thousandIndexed field matching
Tens of thousandsDatabase full-text search
Hundreds of thousandsDedicated search index
Meaning matters more than wordsSemantic search

Search results must be filtered by what the user may see, before ranking rather than after. A search that reveals the existence of records the user cannot open is still a leak.

That includes any autocomplete or type-ahead, which is frequently implemented separately and forgotten.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

When do we need a search engine?

When database full-text search stops performing, usually in the hundreds of thousands of records. Before that it is complexity without benefit.

What about semantic search?

Useful where users search by meaning rather than by exact terms — documentation and free text. Less useful for reference numbers.

How do we handle typos?

Fuzzy matching on names, exact on identifiers. Fuzzy matching on reference numbers produces confusing results.

Should search be permission-filtered?

Always, before ranking. Including autocomplete, which is commonly missed.

Keep reading

More on Python & Django

Python & Django

An API Other Systems Can Depend On

Designing a Python API service others can depend on: validation at the boundary, consistent errors and status codes, early versioning and documentation.

Python & Django

Moving and Transforming Data Reliably

Building data pipelines in Python that cope with malformed input: restartable stages, quarantining failures, reconciling counts and alerting on absence.

Start here

Staff unable to find records quickly?

Usually normalisation and field weighting rather than a search engine. Happy to look at what they search for.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →