With space and without space search

I am using Elasticsearch 7.8 and would like to get the same results if the words have space or without space with searched with match_phrase_prefix query.
example: Some of the documents have " 5 mg " (with space).So when I search for "5 mg" then I would get a record. but when I search with "5mg", I would like to no get a record. Is it possible to do this with Elasticsearch?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.