fix searching for inventory number
go easier on the database