How do I ignore specific words in query?

I am trying to build a search index for camera lens. I store the focal length and aperture as an integer in my indice.

Example data of a 35mm F1.4 lens:
focal-length: 35
aperture: 1.4

And I’m expecting people will search with query like “35mm f1.4” and I would like to ignore the “mm” and “f” in these case and return the right result. How do I do this?