assumes if queryOptions is missing then search is missing as well