param value returns export type SearchTransformFn = ( value : string ) => string ; param query returns export function defaultTransform ( query ) { return query . split ( /"([^"]+)"/g ) . map ( ( terms , index ) => index & 1 ? terms . replace ( /^\b|^(?![^\x00-\x7F]|$)|\s+/g , " +" ) : terms ) . join ( "" ) . replace ( /"|(?:^|\s+)[*+\-:^~]+(?=\s+|$)/g , "" ) . trim ( ) ; }