-
Notifications
You must be signed in to change notification settings - Fork 133
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
Error when use synonyms_path #303
Comments
synonyms_path = "analyzers/F34192456" => synonyms = split("\n", file("${path.module}/data/synonyms.txt")) |
Hello, can you please include the following:
|
|
relevant terraform resource
|
adding TF_LOG=info doesn't add any new log, just
|
I am wondering is it possible to write a custom API request hitting ES directly (instead of using yaml)? So I can workaround the issue in the meantime? |
Can you please include the entire terraform definition? All of |
Thank you. @phillbaker There is a minimal repro version that still has the same issue terraform {
required_providers {
elasticsearch = {
source = "phillbaker/elasticsearch"
version = ">=1.5.8"
}
}
}
provider "elasticsearch" {
url = var.es_endpoint
aws_region = var.aws_region
sign_aws_requests = true
}
locals {
properties = {
shortdescription = {
type = "text"
store = true
search_analyzer = "en_query_analyzer"
}
}
token_filters = {
synonyms = {
type = "synonym"
lenient = true
synonyms_path = "analyzers/F34192456"
updateable = true
}
}
analyzers = {
en_query_analyzer = {
type = "custom"
tokenizer = "standard"
filter = ["synonyms"]
}
}
}
resource "elasticsearch_index_template" "es_index_catalog_template" {
name = "catalog"
body = jsonencode({
index_patterns = [
"catalog*"
]
mappings = {
properties = local.properties
}
settings = {
"index.mapping.total_fields.limit" = 10000
index = {
analysis = {
analyzer = local.analyzers
filter = local.token_filters
}
}
}
template = "catalog*"
})
}
resource "elasticsearch_index" "es_index_catalog_minirepro" {
name = "catalog-minirepro"
number_of_shards = 1
number_of_replicas = var.replicas_count
depends_on = [elasticsearch_index_template.es_index_catalog_template]
}
|
@phillbaker do you know any debugging tips? I tries to see what the web API ends up generated. Do you know how? |
Hi all, please help me resolve this issue
I try to use AWS open search package feature for dynamic synonym https://docs.aws.amazon.com/opensearch-service/latest/developerguide/custom-packages.html
However, after I upload and associate the package by hand. I get the following error while creating a index using the TF. It does not have more detail. If I change synonyms_path back to an explicit list, that works, however I still cannot use dynamic synonym. (synonyms_path = "analyzers/F34192456" => synonyms = split("\n", file("${path.module}/data/synonyms.txt"). And interestingly, even thought it gives 400 back. The index get created with the right _settings
The text was updated successfully, but these errors were encountered: