optimizing inline search