def _get_segmentcounts(self):
        self.loggit.debug('Getting index segment counts')
        self.empty_list_check()
        index_lists = chunk_index_list(self.indices)
        for l in index_lists:
            working_list = (
                self.client.indices.segments(index=to_csv(l))['indices']
            )
            if working_list:
                for index in list(working_list.keys()):
                    shards = working_list[index]['shards']
                    segmentcount = 0
                    for shardnum in shards:
                        for shard in range(0,len(shards[shardnum])):
                            segmentcount += (
                                shards[shardnum][shard]['num_search_segments']
                            )
                    self.index_info[index]['segments'] = segmentcount
Saves the model as a gzipped pickle file at the given path.
dataset/ETHPy150Open elastic/curator/curator/indexlist.py/IndexList._get_segmentcounts--crossover with--dataset/ETHPy150Open clips/pattern/pattern/vector/__init__.py/Model.save