Parameters
		----------
		values: [term, ...]

		Returns
		-------
		IndexStore
482131
def build(values):
		'''
		
		'''
		idxstore = IndexStore()
		idxstore._i2val = list(values)
		idxstore._val2i = {term:i for i,term in enumerate(values)}
		idxstore._next_i = len(values)
		return idxstore
432057
def iteritems(self):
        
        for m in self.mappings:
            yield self.indexes[m.clause][m.target], m
912922
def In(self, *values):
    
    self._awql = self._CreateMultipleValuesCondition(values, 'IN')
    return self._query_builder
212349
def values(self, *args: str, **kwargs: str) -> "ValuesQuery":
        
        fields_for_select = {}  # type: Dict[str, str]
        for field in args:
            if field in fields_for_select:
                raise FieldError("Duplicate key {}".format(field))
            fields_for_select[field] = field

        for return_as, field in kwargs.items():
            if return_as in fields_for_select:
                raise FieldError("Duplicate key {}".format(return_as))
            fields_for_select[return_as] = field

        return ValuesQuery(
            db=self._db,
            model=self.model,
            q_objects=self._q_objects,
            fields_for_select=fields_for_select,
            distinct=self._distinct,
            limit=self._limit,
            offset=self._offset,
            orderings=self._orderings,
            annotations=self._annotations,
            custom_filters=self._custom_filters,
        )
553310
def indexes(self):
        
        if self._indexes is None:
            self._indexes = default_indexes(self._coords, self.dims)
        return Indexes(self._indexes)
459624
def _index_key_for(self, att, value=None):
        
        if value is None:
            value = getattr(self, att)
            if callable(value):
                value = value()
        if value is None:
            return None
        if att not in self.lists:
            return self._get_index_key_for_non_list_attr(att, value)
        else:
            return self._tuple_for_index_key_attr_list(att, value)
944721
def by_value(self, value, default=None):
        
        try:
            return [k for k, v in self.items() if v == value][0]
        except IndexError:
            if default is not None:
                return default
            raise ValueError('%s' % value)
1275412
def get_keys_for(self, value):
        
        if callable(value):
            return value(self)
        hash_value = self.get_hash_for(value)
        return self._index[hash_value][:]
99182
def find(self, term, value=False):
        
        if '.' in term:
            parent, term = term.split('.')
            assert parent.lower() == self.record_term_lc, (parent.lower(), self.record_term_lc)

        for c in self.children:
            if c.record_term_lc == term.lower():
                if value is False or c.value == value:
                    yield c
477743
def get_indexable(cls):
        
        model = cls.get_model()
        return model.objects.order_by('id').values_list('id', flat=True)
261674
def index_run(record_path, keep_json, check_duplicate):
    
    from .config import ConfigStore
    from .indexer import Indexer
    cfstore = ConfigStore()
    indexer = Indexer(cfstore, check_duplicate, keep_json, record_path)
    indexer.index_all()
309685
def query(self, time_indices):
    
    if self._disposed:
      raise ValueError(
          'Cannot query: this _WatchStore instance is already disposed')
    if not isinstance(time_indices, (tuple, list)):
      time_indices = [time_indices]
    output = []
    for time_index in time_indices:
      if isinstance(self._data[time_index], _TensorValueDiscarded):
        output.append(None)
      else:
        data_item = self._data[time_index]
        if (hasattr(data_item, 'dtype') and
            tensor_helper.translate_dtype(data_item.dtype) == 'string'):
          _, _, data_item = tensor_helper.array_view(data_item)
          data_item = np.array(
              tensor_helper.process_buffers_for_display(data_item),
              dtype=np.object)
        output.append(data_item)

    return output
486272
def _get_index_list_of_values(d, k, def_value=None):
    """"""
    v = d.get(k, def_value)
    if v is None:
        return []
    if isinstance(v, list):
        return v
    return [v]
1046929
def find_by_index(self, cls, index_name, value):
        """"""
        table_name = cls.get_table_name()
        index_name_vals = [(index_name, value)]

        final_results = []
        for db_result in read_by_indexes(table_name, index_name_vals):
            obj = cls.from_data(db_result['value'])
            final_results.append(obj)

        return final_results
1209281
def make_value_from_datastore(self, value):
    

    if value is None:
      return None
    _json = json.loads(value, cls=JsonDecoder)
    if self.data_type == dict:
      return _json
    return self.data_type.from_json(_json)
873475
def index(self, value):
        
        if self.__modified_data__ is not None:
            return self.__modified_data__.index(value)
        return self.__original_data__.index(value)
1031108
def indexables(self):
        
        if self._indexables is None:

            d = self.description

            # the index columns is just a simple index
            self._indexables = [GenericIndexCol(name='index', axis=0)]

            for i, n in enumerate(d._v_names):

                dc = GenericDataIndexableCol(
                    name=n, pos=i, values=[n], version=self.version)
                self._indexables.append(dc)

        return self._indexables