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

Reloads search analyzers are unsupported for synonym_graph #45127

Closed
kasa-taku opened this issue Aug 2, 2019 · 2 comments · Fixed by #45135
Closed

Reloads search analyzers are unsupported for synonym_graph #45127

kasa-taku opened this issue Aug 2, 2019 · 2 comments · Fixed by #45135
Assignees
Labels
>bug :Search Relevance/Analysis How text is split into tokens Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v7.3.0 v8.0.0-alpha1

Comments

@kasa-taku
Copy link

kasa-taku commented Aug 2, 2019

Elasticsearch v7.3.0

The Indices-reload-analyzers document says "both synonym and synonym_graph", but only "synonym" filter is supported.
https://www.elastic.co/guide/en/elasticsearch/reference/7.3/indices-reload-analyzers.html#indices-reload-analyzers

1.Create Index

PUT test/
{
  "settings": {
    "index": {
      "number_of_shards": "1",
      "number_of_replicas": 0,
      "analysis": {
        "filter": {
          "synonym": {
            "type": "synonym",
            "synonyms_path": "synonyms.txt",
            "updateable" : true
          },
          "synonym_graph": {
            "type": "synonym_graph",
            "synonyms_path": "synonyms.txt",
            "updateable" : true
          }
        },
        "analyzer": {
          "synonym_analyzer": {
            "type": "custom",
            "tokenizer": "whitespace",
            "filter": [
              "synonym"
            ]
          },
          "synonym_graph_analyzer": {
            "type": "custom",
            "tokenizer": "whitespace",
            "filter": [
              "synonym_graph"
            ]
          }
        }
      }
    }
  }
}

2.Reloads search analyzers API

POST test/_reload_search_analyzers

3.Returns with
reloaded_analyzers is only "synonym_analyzer".

{
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "reload_details" : [
    {
      "index" : "test",
      "reloaded_analyzers" : [
        "synonym_analyzer"
      ],
      "reloaded_node_ids" : [
        "ATMfHkMvTKmhp7WSNcVlPA"
      ]
    }
  ]
}
@cbuescher cbuescher self-assigned this Aug 2, 2019
@cbuescher cbuescher added the :Search Relevance/Analysis How text is split into tokens label Aug 2, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Aug 2, 2019
Reloading of synonym_graph filter doesn't work currently because the search time
AnalysisMode doesn't get propagated to the TokenFilterFactory emitted by the
graph filters getChainAwareTokenFilterFactory() method. This change fixes that.

Closes elastic#45127
@cbuescher
Copy link
Member

Thanks @kasa-taku for reporting this and the great reproduction. I opened #45135 to fix this.

cbuescher pushed a commit that referenced this issue Aug 2, 2019
Reloading of synonym_graph filter doesn't work currently because the search time
AnalysisMode doesn't get propagated to the TokenFilterFactory emitted by the
graph filters getChainAwareTokenFilterFactory() method. This change fixes that.

Closes #45127
cbuescher pushed a commit that referenced this issue Aug 2, 2019
Reloading of synonym_graph filter doesn't work currently because the search time
AnalysisMode doesn't get propagated to the TokenFilterFactory emitted by the
graph filters getChainAwareTokenFilterFactory() method. This change fixes that.

Closes #45127
cbuescher pushed a commit that referenced this issue Aug 2, 2019
Reloading of synonym_graph filter doesn't work currently because the search time
AnalysisMode doesn't get propagated to the TokenFilterFactory emitted by the
graph filters getChainAwareTokenFilterFactory() method. This change fixes that.

Closes #45127
@javanna javanna added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search Relevance/Analysis How text is split into tokens Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v7.3.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants