getIndexes

@return  mixed
199023
public function getIndexes()
    {
        $this->db->setQuery(
            '
SELECT
    t.relname AS table_name,
    i.relname AS index_name,
    a.attname AS column_name,
    ix.indisunique AS is_unique,
    ix.indisprimary AS is_primary
FROM pg_class AS t,
    pg_class AS i,
    pg_index AS ix,
    pg_attribute AS a
WHERE t.oid = ix.indrelid
    AND i.oid = ix.indexrelid
    AND a.attrelid = t.oid
    AND a.attnum = ANY(ix.indkey)
    AND t.relkind = \'r\'
    AND t.relname = ' . $this->db->quote($this->db->replacePrefix($this->getName())) . '
ORDER BY t.relname, i.relname;'
        );

        $keys = $this->db->loadAll();

        foreach ($keys as $key) {
            $key->Table = $this->getName();
            $key->Non_unique = !$key->is_unique;
            $key->Key_name = $key->index_name;
            $key->Column_name = $key->column_name;
            $key->Collation = 'A';
            $key->Cardinality = 0;
            $key->Sub_part = null;
            $key->Packed = null;
            $key->Null = null;
            $key->Index_type = 'BTREE';
            // TODO: Finish comments query
            $key->Comment = null;
            $key->Index_comment = null;
        }

        return $keys;
    }
909458
public function getIndexes()
    {
        if (!$this->indexCache) {
            // Get the details columns information.
            $this->db->setQuery('SHOW KEYS FROM ' . $this->db->quoteName($this->getName()));

            $this->indexCache = $this->db->loadAll();
        }

        return $this->indexCache;
    }
265065
public function getIndex()
    {
        $title      = "Inlägg";

        $text = new ShowAllService($this->di);

        $data = [
            "items" => $text->getHTML(),
        ];

        $crud = "comm/crud/front";
        $this->toRender($title, $crud, $data);
    }
1302984
public function getIndexedProperties()
    {
        $props = [];
        foreach ($this->properties as $property) {
            if ($property->isIndexed()) {
                $props[] = $property;
            }
        }

        return $props;
    }
1204969
public function getAllIndexes()
    {
        $result = [new Index('id', ['id'], IndexInterface::PRIMARY)];

        if ($this->getPolymorph()) {
            $result[] = new Index('type');
        }

        if (!empty($this->getIndexes())) {
            $result = array_merge($result, $this->getIndexes());
        }

        foreach ($this->getAssociations() as $assosication) {
            if ($assosication instanceof InjectIndexesInsterface) {
                $association_indexes = $assosication->getIndexes();

                if (!empty($association_indexes)) {
                    $result = array_merge($result, $association_indexes);
                }
            }
        }

        return $result;
    }
1018155
private function getIndex()
    {
        $indexName = $this->readBaseConfigParam('index');

        return $this->indexManager->getIndexByName($indexName, $this->storeId);
    }
174102
protected function buildIndex(): array
    {
        $file = $this->getFile($this->getStoragePath());
        $modified = $file->modified();

        $this->data = (array) $file->content();

        $list = [];
        foreach ($this->data as $key => $info) {
            $list[$key] = [
                'storage_key' => $key,
                'storage_timestamp' => $modified
            ];
        }

        return $list;
    }
941019
public function getIndexDefinition()
    {
        return array(
            'selected_option_value' => new Search\FieldType\MultipleStringField(),
            'selected_option_index' => new Search\FieldType\MultipleIntegerField(),
            'selected_option_count' => new Search\FieldType\IntegerField(),
            'sort_value' => new Search\FieldType\StringField(),
        );
    }
367507
private function getDefaultIndexParams()
    {
        $analyzers = Config::get('larasearch.elasticsearch.analyzers');
        $params = Config::get('larasearch.elasticsearch.defaults.index');
        $mapping = [];

        $mapping_options = array_combine(
            $analyzers,
            array_map(function ($type)
                {
                    $config = $this->getProxy()->getConfig();

                    // Maintain backwards compatibility by allowing a plain array of analyzer => fields
                    $field_mappings = Utils::findKey($config, $type, false) ?: [];

                    // Also read from a dedicated array key called 'analyzers'
                    if (isset($config['analyzers']))
                    {
                        $field_mappings = array_merge($field_mappings, Utils::findKey($config['analyzers'], $type, false) ?: []);
                    }

                    return $field_mappings;
                },
                $analyzers
            )
        );

        foreach (array_unique(array_flatten(array_values($mapping_options))) as $field)
        {
            // Extract path segments from dot separated field
            $pathSegments = explode('.', $field);

            // Last element is the field name
            $fieldName = array_pop($pathSegments);

            // Apply default field mapping
            $fieldMapping = [
                'type' => "multi_field",
                'fields' => [
                    $fieldName => [
                        'type' => 'string',
                        'index' => 'not_analyzed'
                    ],
                    'analyzed' => [
                        'type' => 'string',
                        'index' => 'analyzed'
                    ]
                ]
            ];

            // Check if we need to add additional mappings
            foreach ($mapping_options as $type => $fields)
            {
                if (in_array($field, $fields))
                {
                    $fieldMapping['fields'][$type] = [
                        'type' => 'string',
                        'index' => 'analyzed',
                        'analyzer' => "larasearch_${type}_index"
                    ];
                }
            }

            if (!empty($pathSegments))
            {
                $mapping = Utils::array_merge_recursive_distinct(
                    $mapping,
                    $this->getNestedFieldMapping($fieldName, $fieldMapping, $pathSegments)
                );
            } else
            {
                $mapping[$fieldName] = $fieldMapping;
            }
        }

        if (!empty($mapping)) $params['mappings']['_default_']['properties'] = $mapping;

        $params['index'] = $this->getName();
        $params['type'] = $this->getProxy()->getType();

        return $params;
    }
60381
public function getIndexes()
    {
        $query = $this->db->getQuery(true);
        $table = $this->db->replacePrefix($this->name);

        $query->select([
            'tbl.name AS table_name',
            'col.name AS column_name',
            'idx.name AS index_name',
            'col.*',
            'idx.*'
        ])
            ->from('sys.columns AS col')
            ->leftJoin(
                'sys.tables AS tbl',
                'col.object_id = tbl.object_id'
            )
            ->leftJoin(
                'sys.index_columns AS ic',
                'col.column_id = ic.column_id AND ic.object_id = tbl.object_id'
            )
            ->leftJoin(
                'sys.indexes AS idx',
                'idx.object_id = tbl.object_id AND idx.index_id = ic.index_id'
            )
            ->where('tbl.name = %q', $table)

            ->where('(idx.name IS NOT NULL OR col.is_identity = 1 OR idx.is_primary_key = 1)');

        $indexes = $this->db->prepare($query)->loadAll();

        $keys = [];

        foreach ($indexes as $index) {
            $key = new \stdClass();

            $key->Table = $table;
            $key->Is_primary = $index->is_primary_key ?: $index->is_identity;
            $key->Non_unique = !$index->is_unique;
            $key->Key_name = $key->Is_primary ? 'PRIMARY' : $index->index_name;
            $key->Column_name = $index->column_name;
            $key->Collation = 'A';
            $key->Cardinality = 0;
            $key->Sub_part = null;
            $key->Packed = null;
            $key->Null = null;
            $key->Index_type = 'BTREE';
            // TODO: Finish comments query
            $key->Comment = null;
            $key->Index_comment = null;
            $key->is_identity = $index->is_identity ? 'auto_increment' : '';

            $keys[] = $key;
        }

        return $keys;
    }
194262
public String[] getIndexArr() {
		String[] indexArr = new String[this.from.size()];
		for (int i = 0; i < indexArr.length; i++) {
			indexArr[i] = this.from.get(i).getIndex();
		}
		return indexArr;
	}
684172
protected function getTableIndexes(): array
    {
        $data = [];

        $idxs = $this->db->schema->getTableIndexes($this->tableName, true);

        /* @var $idx IndexConstraint */
        foreach ($idxs as $idx) {
            if (!$idx->isPrimary) {
                $data[$idx->name] = new TableIndex([
                    'name' => $idx->name,
                    'unique' => $idx->isUnique,
                    'columns' => $idx->columnNames
                ]);
            }
        }

        return $data;
    }
342412
public function getIndices(): array
    {
        $indices = [];
        foreach ($this->_data['indices'] as $indexName => $index) {
            $indices[$indexName] = new Index($indexName, $index);
        }

        return $indices;
    }
926454
public function getIndexQueueMonitoredTables()
    {
        $monitoredTables = [];

        $indexingConfigurations = $this->getEnabledIndexQueueConfigurationNames();
        foreach ($indexingConfigurations as $indexingConfigurationName) {
            $monitoredTable = $this->getIndexQueueTableNameOrFallbackToConfigurationName($indexingConfigurationName);
            $monitoredTables[] = $monitoredTable;
            if ($monitoredTable === 'pages') {
                // when monitoring pages, also monitor creation of translations
                $monitoredTables[] = 'pages_language_overlay';
            }
        }

        return array_values(array_unique($monitoredTables));
    }
1360621
public function index(): array {
        list($indexed, $commited) = $this->__index();

        $this->indexedRes  = array();
        $this->commitedRes = array();
        return $indexed;
    }
1171379
public function getMapping()
    {
        $params['index'] = $this->getLastIndexName();
        $params['type'] = 'jobs';

        return $this->client->indices()->getMapping($params);
    }
407929
public function buildIndex()
    {
        $this->file->flock(LOCK_SH);
        $this->file->fseek(0);

        $indexes = [];
        while (!$this->file->eof()) {
            $position = $this->file->ftell();

            // Grab key and value lengths - if its the last (empty) line, break
            if (!$metadata = $this->getMetadata()) {
                break;
            }

            // Gets the key and adds the key and position to the index
            $indexes[$this->file->fread($metadata->klen)] = $position;

            //Skip over the value, to the next key/value pair
            $this->file->fseek($metadata->vlen, SEEK_CUR);
        }
        $this->file->flock(LOCK_UN);

        return $indexes;
    }