// Index will increment a simple int version based on the visits that this user/session did.
551300
func Index(ctx iris.Context, session *sessions.Session) {
	// it increments a "visits" value of integer by one,
	// if the entry with key 'visits' doesn't exist it will create it for you.
	visits := session.Increment("visits", 1)

	// write the current, updated visits.
	ctx.Writef("%d visit(s) from my current session", visits)
}
1073710
func (r *SearchRequest) Index(indices ...string) *SearchRequest {
	r.indices = append(r.indices, indices...)
	return r
}
1040656
func (s *ClusterStateService) Index(indices ...string) *ClusterStateService {
	s.indices = append(s.indices, indices...)
	return s
}
1953
func (s *DeleteByQueryService) Index(index ...string) *DeleteByQueryService {
	s.index = append(s.index, index...)
	return s
}
1206677
func (s *IndicesExistsTypeService) Index(index ...string) *IndicesExistsTypeService {
	s.index = append(s.index, index...)
	return s
}
398635
func (s *IndicesPutSettingsService) Index(indices ...string) *IndicesPutSettingsService {
	s.index = append(s.index, indices...)
	return s
}
1051671
func (p *Path) Index(index int) *Path {
	return &Path{index: strconv.Itoa(index), parent: p}
}
437044
func (s *GetService) Index(index string) *GetService {
	s.index = index
	return s
}
187336
func (b *CreateIndexService) Index(index string) *CreateIndexService {
	b.index = index
	return b
}
549630
func (s *IndexStorage) Index() (*index.Index, error) {
	if !s.set {
		return s.IndexStorer.Index()
	}

	return s.temporal.Index()
}
1138174
func (s *IndicesGetMappingService) Index(indices ...string) *IndicesGetMappingService {
	s.index = append(s.index, indices...)
	return s
}
50358
func (ctrl Controller) Index(w http.ResponseWriter, req *http.Request) {
	ctrl.View.Execute("index", map[string]interface{}{}, req, w)
}
1062195
func (r *BulkUpdateRequest) Index(index string) *BulkUpdateRequest {
	r.index = index
	r.source = nil
	return r
}
409028
func (s *IndicesGetFieldMappingService) Index(indices ...string) *IndicesGetFieldMappingService {
	s.index = append(s.index, indices...)
	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++
	}
}
1251808
func (m *model) Index(deviceID protocol.DeviceID, folder string, fs []protocol.FileInfo) {
	m.handleIndex(deviceID, folder, fs, false)
}
169024
func (s *StateStore) Index(name string) (uint64, error) {
	txn := s.db.Txn(false)

	// Lookup the first matching index
	out, err := txn.First("index", "id", name)
	if err != nil {
		return 0, err
	}
	if out == nil {
		return 0, nil
	}
	return out.(*IndexEntry).Value, nil
}