// Index honors the storer.IndexStorer interface.
549630
func (s *IndexStorage) Index() (*index.Index, error) {
	if !s.set {
		return s.IndexStorer.Index()
	}

	return s.temporal.Index()
}
48856
func (c *Client) Index(bucket, index, key, start, end string) (*RpbIndexResp, error) {
	return c.index(nil, bucket, index, key, start, end)
}
245101
func (s *IndexStorage) SetIndex(idx *index.Index) (err error) {
	if err := s.temporal.SetIndex(idx); err != nil {
		return err
	}

	s.set = true
	return nil
}
696808
func (r *BulkIndexRequest) Index(index string) *BulkIndexRequest {
	r.index = index
	r.source = nil
	return r
}
1206677
func (s *IndicesExistsTypeService) Index(index ...string) *IndicesExistsTypeService {
	s.index = append(s.index, index...)
	return s
}
407440
func (m *HashMap) index(key []byte) int64 {
	hash := HashKey(key)
	pos := hash & m.mask

	var dist int64
	for {
		if m.hashes[pos] == 0 {
			return -1
		} else if dist > Dist(m.hashes[pos], pos, m.capacity) {
			return -1
		} else if m.hashes[pos] == hash && bytes.Equal(m.elems[pos].key, key) {
			return pos
		}

		pos = (pos + 1) & m.mask
		dist++
	}
}
380031
func (s *RefreshService) Index(index ...string) *RefreshService {
	s.index = append(s.index, index...)
	return s
}
1029497
func (w *Writer) Index() (*MemoryIndex, error) {
	w.m.Lock()
	defer w.m.Unlock()

	if w.index == nil {
		return w.createIndex()
	}

	return w.index, nil
}
55729
func (s *AliasesService) Index(index ...string) *AliasesService {
	s.index = append(s.index, index...)
	return s
}
1187868
func (s *CatCountService) Index(index ...string) *CatCountService {
	s.index = index
	return s
}
196281
func (api *API) Index(ctx context.Context, indexName string) (*Index, error) {
	span, _ := tracing.StartSpanFromContext(ctx, "API.Index")
	defer span.Finish()

	if err := api.validate(apiIndex); err != nil {
		return nil, errors.Wrap(err, "validating api method")
	}

	index := api.holder.Index(indexName)
	if index == nil {
		return nil, newNotFoundError(ErrIndexNotFound)
	}
	return index, nil
}
1362293
func (c *collection) Index(ctx context.Context, name string) (Index, error) {
	req, err := c.conn.NewRequest("GET", path.Join(c.relPath("index"), name))
	if err != nil {
		return nil, WithStack(err)
	}
	resp, err := c.conn.Do(ctx, req)
	if err != nil {
		return nil, WithStack(err)
	}
	if err := resp.CheckStatus(200); err != nil {
		return nil, WithStack(err)
	}
	var data indexData
	if err := resp.ParseBody("", &data); err != nil {
		return nil, WithStack(err)
	}
	idx, err := newIndex(data.ID, data.Type, c)
	if err != nil {
		return nil, WithStack(err)
	}
	return idx, nil
}
1051671
func (p *Path) Index(index int) *Path {
	return &Path{index: strconv.Itoa(index), parent: p}
}
496105
func (s *DeleteMappingService) Index(index ...string) *DeleteMappingService {
	s.index = append(s.index, index...)
	return s
}
1110347
func (aSpace *addrSpace) Index() uint64 {
	aSpace.Lock()
	defer aSpace.Unlock()
	return aSpace.dbIndex
}
1185655
func (s *FieldCapsService) Index(index ...string) *FieldCapsService {
	s.index = append(s.index, index...)
	return s
}
1175493
func (h *Head) Index() (IndexReader, error) {
	return h.indexRange(math.MinInt64, math.MaxInt64), nil
}