CSPACE-5943: Added stub code for restricting by tenant ID, where needed. Explicitly handle cases where partial term query parameter value is blank. Multiple improvements to comments and log statements.