Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flex: Add support for configuring table indexes in the Lua config #1847

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

joto
Copy link
Collaborator

@joto joto commented Dec 5, 2022

The table definitions have a new (optional) field called "indexes" now which takes a list of index definitions. If the field is not there, we fall back to what we did before, a GIST index on the only/first geometry column of table is created. To disable indexes, set to an empty array.

See the flex-config/indexes.lua Lua config for some usage examples.

See #1780


std::string columns() const;

void set_columns(std::string const &columns)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's rather 'add_column'?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not intended for adding columns one at a time, but an overload of the void set_columns(std::vector<std::string> const &columns) function so that we don't have to create a vector if all we want is to add a single column.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an assert.

The table definitions have a new (optional) field called "indexes" now
which takes a list of index definitions. If the field is not there, we
fall back to what we did before, a GIST index on the only/first geometry
column of table is created. To disable indexes, set to an empty array.

See the flex-config/indexes.lua Lua config for some usage examples.

See osm2pgsql-dev#1780
@lonvia lonvia merged commit f4e64c8 into osm2pgsql-dev:master Dec 7, 2022
@joto joto mentioned this pull request Dec 7, 2022
4 tasks
@joto joto deleted the flex-indexes branch December 13, 2022 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants