Search box with ajax results, query with wildcard (but also allow 1-2 typos)

Hi I'm trying to create a search box that returns results from Elastic on keypress. The problem is with the documentation warning not to use both fuzzy and wildcard in a query.

Is there an other way to use wildcard and allow for a typo or two?

This is my current query:

const query = {   
        bool: {
            should: {
                match: {
                    status: "publish"
                }
            },            
            filter: {
                bool: {
                    minimum_should_match: 1,
                    should: [                        
                        {
                            query_string: {
                              fields: [
                                "name"
                              ],
                              query: `${queryString}~2`,     
                              // fuzzy_prefix_length : 3,                         
                            }
                        },                        
                    ]
                }
            },
            // should: [
                
            // ]                                    
        }                
    }        

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