code: private void checkDefaults() {
          Utils.require(m_shards != null || m_shardsRange != null, "shards or range parameter is not set");
          Utils.require(m_shards == null || m_shardsRange == null, "shards and range parameters cannot be both set");
          
          Utils.require(m_continueAt == null || m_continueAfter == null, "Both continue-at and continue-after parameters cannot be set");
          Utils.require((m_continueAt == null && m_continueAfter == null) || m_sortOrder == null, "continuation oarameters cannot be set if sort order is set");
          
          Utils.require(m_xshards == null || m_xshardsRange == null, "xshards and xrange parameters cannot be both set");
          if(m_xshards == null && m_xshardsRange == null) {
          	m_xshards = m_shards;
          	m_xshardsRange = m_shardsRange;
          }
          
          if (m_query == null) m_query = "*";
          if (m_pageSize == -1) m_pageSize = search_default_page_size;
      }
docs: Check required parameters and set default values.