Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
Python & Django

Helping People Find Records

Last updated:

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

Respect permissions in 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.

Frequently asked questions

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

Staff unable to find records quickly?

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

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Custom Software DevelopmentWeb DevelopmentMachine Learning