#14625·wagtail

Search: pages missing from results when titles contain signed numbers

Author: joepercivalCreated Sep 17, 2026Updated Sep 17, 2026
Labelstype:Bugstatus:Unconfirmed

Issue summary

Some pages don't list as results when submitting a search query.

Pages with numbers in the title can sometimes not be found in search results. This only appears to be the case when the number is immediately prefixed by a hyphen (i.e. <page title>-123). When searching for the exact page title, the page will not be shown in the results.

I believe this is because:

  • search queries may somehow represent numbers in such a way that they are always unsigned (i.e. -123 will be represented as the token 123)
  • page titles may somehow represent numbers as signed (i.e. -123 will be represented as the token -123)

Therefore when searching for the page page-123, the search query is interpreted as 123 and the page title is interpreted as -123, meaning these tokens don't match and the page is not shown despite the search text and title text being identical.

Steps to reproduce

  1. Open wagtail admin
  2. Create two pages of any type, with titles e.g. page-1 and page 2 (note one has a hyphen immediately before the numerical suffix, and the other does not)
  3. Try to search for each of these pages with the exact page title.
  4. Observe that only page 2 appears in search results.
  5. Observe that searching for page will show both pages in the search results.
  6. Observe that searching for 1 and then 2 will only yield page 2.
  7. Observe that searching for -1 will not yield page-1.
Image Image Image

Additional information

Searching for the exact page title should yield the page in search results

Can be reproduced

Yes, on the bakerydemo

Technical details

Reproducible on the latest bakerydemo

Working on this

If you would like to contribute to this issue, follow these steps:

  • Confirm that the issue is reproducible, either on a fresh Wagtail project or the bakerydemo.
  • Once confirmed, view our contributing guidelines, add a comment to the issue once you're ready to start.