Returns array containing names of primary indexes

@return FieldInterface[]
193009
public function primaryFields()
    {
        $result = [];
        foreach ($this->indexes as $index) {
            if (!$index->isPrimary()) {
                continue;
            }

            foreach ($index->fields() as $field) {
                $result[] = $this->field($field);
            }
        }

        return $result;
    }
82176
public function getFieldNames()
    {
        $names = array();

        foreach ($this->getFields() as $field) {
            $names[] = $field->name;
        }

        return $names;
    }
406640
public function getFields(): array
    {
        $fields = $this->reflection->getSchema();

        foreach ($fields as $field => $type) {
            if ($this->isAggregation($type)) {
                unset($fields[$field]);
            }
        }

        return $fields;
    }
63210
public function getJoins()
    {
        $joins = [];

        foreach ($this->fieldDescriptors as $fieldDescriptor) {
            $joins = array_merge($joins, $fieldDescriptor->getJoins());
        }

        return $joins;
    }
515565
public function getSlugableFieldNames($primary = false)
    {
        $results = [];
        if ($primary) {
            $results[] = $primary;
        }

        if (!isset($this->data['fields']) || empty($this->data['fields'])) {
            return $results;
        }

        $table = $this->data['name'];
        foreach ($this->data['fields'] as $field) {
            $name = $table . '_' . $field['name'];
            if (isset($field['type'])) {
                if ($field['type'] === 'slug') {
                    $results[] = $name;
                }
            }
        }

        return $results;
    }
717697
public function getPrimary() {
        foreach ($this->_fields as $key => $field) {
            if ($field->primary == true) {
                $this->_primary = $key;
                break;
            }
        }
    }
386897
public function fieldNames()
    {
        if ($this->hasProperty()) {
            $property = $this->property();
            if ($property instanceof StorablePropertyInterface) {
                return $property->fieldNames();
            } else {
                return [ $property ];
            }
        }

        return [];
    }
568351
public function getFileFieldNames()
    {
        $results = [];
        if (!isset($this->data['fields'])
            || empty($this->data['fields'])
        ) {
            return $results;
        }

        $table = $this->data['name'];
        foreach ($this->data['fields'] as $field) {
            $name = $table . '_' . $field['name'];

            if (in_array(
                $field['field']['type'],
                [
                        'file',
                        'image',
                        'filelist',
                        'imagelist'
                    ]
            )
            ) {
                $results[] = $name;
            }
        }

        return $results;
    }
1187344
protected function getStaticFields()
	{
		$fields = [];
		foreach ($this->info as $info)
		{
			if (is_array($info))
			{
				foreach ($info as $value)
				{
					if ($value instanceof AbstractDto)
					{
						$fields += $value->getStaticFields();
					}
				}
			}
			if ($info instanceof AbstractDto)
			{
				$fields += $info->getStaticFields();
			}
		}

		return $fields;
	}
41229
public function list_fields()
	{
		$field_names = array();
		for ($i = 0, $c = $this->num_fields(); $i < $c; $i++)
		{
			$field_names[] = $this->result_id->columnName($i);
		}

		return $field_names;
	}
94862
public function getIndexDefinition()
    {
        return [
            'tag_keywords' => new Search\FieldType\MultipleStringField(),
            'parent_tag_ids' => new Search\FieldType\MultipleIntegerField(),
            'tag_ids' => new Search\FieldType\MultipleIntegerField(),
            'tag_text' => new Search\FieldType\TextField(),
            'fulltext' => new Search\FieldType\FullTextField(),
        ];
    }
77398
public function getIndexFields($indexSequences)
    {
        $indexFields = [];
        foreach ($indexSequences as $indexData) {
            $indexFields[] = $indexData['Column_name'];
        }
        $result = "['" . implode("','", $indexFields) . "']";

        return $result;
    }
1129843
public function getColumns()
    {
        $primaryKey        = $this->getPrimaryKey();
        $primaryKeyColumns = [];

        if ($primaryKey !== null) {
            $primaryKeyColumns = $this->filterColumns($primaryKey->getColumns());
        }

        return array_merge($primaryKeyColumns, $this->getForeignKeyColumns(), $this->_columns);
    }
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;
    }
820257
public function listColumns()
    {
        $fieldNames = array();
        $field = NULL;
        while ($field = mysqli_fetch_field($this->getResultId())) {
            $fieldNames[] = $field->name;
        }

        return $fieldNames;
    }
804665
public function list_fields()
	{
		$field_names = array();
		for ($i = 0, $c = $this->num_fields(); $i < $c; $i++)
		{
			$field_names[] = pg_field_name($this->result_id, $i);
		}

		return $field_names;
	}
1343933
public function getFields()
    {
        $fields = $this->getInput('fields');

        if (! is_array($fields)) {
            return [];
        }

        return array_map(function ($fields) {
            return explode(',', $fields);
        }, $fields);
    }