code: function (query, indexName) {
          if (!query) return;
          var index = this._indexes[indexName || this.mainIndex];
          return index[query] || index[query[this.mainIndex]] || this._indexes.cid[query] || this._indexes.cid[query.cid];
      }
docs: Internal API try to get a model by index