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

Allow for top-level Elasticsearch mapping to be defined #541

Open
jvanderen1 opened this issue May 9, 2024 · 2 comments
Open

Allow for top-level Elasticsearch mapping to be defined #541

jvanderen1 opened this issue May 9, 2024 · 2 comments

Comments

@jvanderen1
Copy link

It would be nice to define an explicit Elasticsearch mapping (minus any _meta fields` at the top of the schema. Something akin to what is in the Elasticsearch documentation:

PUT /my-index-000001
{
  "mappings": {
    "properties": {
      "age":    { "type": "integer" },  
      "email":  { "type": "keyword"  }, 
      "name":   { "type": "text"  }     
    }
  }
}
@nowfred
Copy link

nowfred commented May 9, 2024

I believe you can do this by setting any mapping you want inside transform.mapping: {} in the schema.json file. We use this to create abstract mappings that apply to some downstream transforms - working well so far.

@jvanderen1
Copy link
Author

@nowfred The problem is that we use custom plugins to shape the schema into a custom format before indexing. Our mappings don't necessarily align with PGSync's schema output.

We need a way to define a custom Elasticsearch mappings without referencing columns.

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

No branches or pull requests

2 participants