Feature/strip search query

For #5174