-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Standard token filter removal causes exceptions after upgrade #50734
Labels
>bug
:Search Relevance/Analysis
How text is split into tokens
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
Comments
Pinging @elastic/es-search (:Search/Analysis) |
matriv
added a commit
to matriv/elasticsearch
that referenced
this issue
Jan 13, 2020
The `PreConfiguredTokenFilter#singletonWithVersion` uses the version internaly for the token filter factories but it registers only one instance in the cahce and not one instance per version. This can lead to exceptions like the one described in elastic#50734 since the version created of the first index creates and caches the singleton. Remove the `singletonWithVersion()` methods and use the `elasticsearchVersion()` methods instead. Fixes: elastic#50734
matriv
added a commit
that referenced
this issue
Jan 16, 2020
The PreConfiguredTokenFilter#singletonWithVersion uses the version internaly for the token filter factories but it registers only one instance in the cahce and not one instance per version. This can lead to exceptions like the one described in #50734 since the singleton is created and cached using the version created of the first index that is processed. Remove the singletonWithVersion() methods and use the elasticsearchVersion() methods instead. Fixes: #50734
matriv
added a commit
to matriv/elasticsearch
that referenced
this issue
Jan 16, 2020
The PreConfiguredTokenFilter#singletonWithVersion uses the version internaly for the token filter factories but it registers only one instance in the cahce and not one instance per version. This can lead to exceptions like the one described in elastic#50734 since the singleton is created and cached using the version created of the first index that is processed. Remove the singletonWithVersion() methods and use the elasticsearchVersion() methods instead. Fixes: elastic#50734 (cherry picked from commit 24e1858)
matriv
added a commit
to matriv/elasticsearch
that referenced
this issue
Jan 16, 2020
The PreConfiguredTokenFilter#singletonWithVersion uses the version internaly for the token filter factories but it registers only one instance in the cahce and not one instance per version. This can lead to exceptions like the one described in elastic#50734 since the singleton is created and cached using the version created of the first index that is processed. Remove the singletonWithVersion() methods and use the elasticsearchVersion() methods instead. Fixes: elastic#50734 (cherry picked from commit 24e1858)
matriv
added a commit
to matriv/elasticsearch
that referenced
this issue
Jan 16, 2020
The PreConfiguredTokenFilter#singletonWithVersion uses the version internaly for the token filter factories but it registers only one instance in the cahce and not one instance per version. This can lead to exceptions like the one described in elastic#50734 since the singleton is created and cached using the version created of the first index that is processed. Remove the singletonWithVersion() methods and use the elasticsearchVersion() methods instead. Fixes: elastic#50734 (cherry picked from commit 24e1858)
matriv
added a commit
that referenced
this issue
Jan 16, 2020
The PreConfiguredTokenFilter#singletonWithVersion uses the version internally for the token filter factories but it registers only one instance in the cache and not one instance per version. This can lead to exceptions like the one described in #50734 since the singleton is created and cached using the version created of the first index that is processed. Remove the singletonWithVersion() methods and use the elasticsearchVersion() methods instead. Fixes: #50734 (cherry picked from commit 24e1858)
matriv
added a commit
that referenced
this issue
Jan 16, 2020
The PreConfiguredTokenFilter#singletonWithVersion uses the version internally for the token filter factories but it registers only one instance in the cache and not one instance per version. This can lead to exceptions like the one described in #50734 since the singleton is created and cached using the version created of the first index that is processed. Remove the singletonWithVersion() methods and use the elasticsearchVersion() methods instead. Fixes: #50734 (cherry picked from commit 24e1858)
matriv
added a commit
that referenced
this issue
Jan 16, 2020
The PreConfiguredTokenFilter#singletonWithVersion uses the version internally for the token filter factories but it registers only one instance in the cache and not one instance per version. This can lead to exceptions like the one described in #50734 since the singleton is created and cached using the version created of the first index that is processed. Remove the singletonWithVersion() methods and use the elasticsearchVersion() methods instead. Fixes: #50734 (cherry picked from commit 24e1858)
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this issue
Jan 23, 2020
The PreConfiguredTokenFilter#singletonWithVersion uses the version internaly for the token filter factories but it registers only one instance in the cahce and not one instance per version. This can lead to exceptions like the one described in elastic#50734 since the singleton is created and cached using the version created of the first index that is processed. Remove the singletonWithVersion() methods and use the elasticsearchVersion() methods instead. Fixes: elastic#50734
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
The removal of standard token filter in combination with the way the relevant factories are cached causes exceptions to be thrown when trying to query or insert documents to a < 7.0.0 index.
Reproduction steps:
and exception is thrown:
The exception is gone if the es node is restarted once again (after the upgrade to >= 7).
It's caused by the way the
Analysis#setupPreConfiguredTokenFilters
registers in the cache using thePreConfiguredTokenFilter#singletonWithVersion
. The strategy used isONE
so there is only one factory and not one per version. So when the node starts for the first time in >= 7 a bunch of new internal indices are created:Of course those have index creation version 7.x.x and so the
TokenFilterFactory
is registered once with version 7.x.x. When our data indexmyindex
gets processed it uses the 7.x.x as version (because due to theONE
caching strategy there is no other instanced cache with version 6.x.x) and so the code below:The text was updated successfully, but these errors were encountered: