Skip to content

Add version to Analyzers #3790

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

Closed
s1monw opened this issue Sep 27, 2013 · 9 comments · Fixed by #3966
Closed

Add version to Analyzers #3790

s1monw opened this issue Sep 27, 2013 · 9 comments · Fixed by #3966

Comments

@s1monw
Copy link
Contributor

s1monw commented Sep 27, 2013

This relates somewhat to #3775 since we want to change the default analyzer in 1.0 we somehow need to decide which version of an analyzer we need to load for a name in a mapping. For instance if an index was created with 0.90.x or earlier the old default analyzer must be used in order to maintain index backwards compatibility for searches etc.

We don't necessarily need this in 0.90 but for now I flagged it as 0.90 unless it's breaking anything

@s1monw
Copy link
Contributor Author

s1monw commented Oct 24, 2013

+1 to push!

@nik9000
Copy link
Member

nik9000 commented Oct 25, 2013

It'd be nice to let the user request a specific version of the prebuilt analyzer. Something like "standard circa 0.90.5". That way when I update elasticsearch and build a new index using the prebuilt analyzer I still get the one I expect.

@s1monw
Copy link
Contributor Author

s1monw commented Oct 25, 2013

we can do this already, you can specify the lucene version. We will not change standart we will only change default really.

@nik9000
Copy link
Member

nik9000 commented Oct 25, 2013

Sounds good to me. Thanks!

@s1monw
Copy link
Contributor Author

s1monw commented Oct 25, 2013

cool!

@s1monw
Copy link
Contributor Author

s1monw commented Oct 25, 2013

looks great! thanks for the additional test. Please push it!

@spinscale
Copy link
Contributor

The integration test is actually useless, because I did not test if the corresponding analyzers were really loaded. By doing this I found out, that they were not - because we overwrite the index.version.created property always with Version.CURRENT when the index is created.

Fixed this, please check again in a second

@spinscale
Copy link
Contributor

Updated. Crucial change (allows to configure the index version) in spinscale@853f64a#diff-beee1cd752cd81f3779332628d5b296eL255

Not sure if we want to leave this in?

@s1monw
Copy link
Contributor Author

s1monw commented Oct 28, 2013

I think that is ok though - I don't think we guarantee anything here so that is fine?

simon

spinscale added a commit that referenced this issue Oct 28, 2013
This patch takes the version of the created index into account when a
prebuilt analyzer is created.
So, if an index was created with 0.90.4, then the prebuilt analyzers
will be the same than on the 0.90.4 release.

One reason for this feature is the possibility to change pre built
analyzers like the standard one.

The patch tries to reuse analyzers as mutch as possible. So even if
version X.Y.Z and X.Y.A use the same lucene analyzers, the same instance
is reused in order to prevent overcreation of lucene analyzer instances.

Closes #3790
dadoonet added a commit to dadoonet/elasticsearch-analysis-stempel that referenced this issue Feb 5, 2014
Due to fix [3790](elastic/elasticsearch#3790) in core, upgrading an analyzer provided as a plugin now fails.

See elastic/elasticsearch#4936 for details.

Issue is in elasticsearch core code but can be fixed in plugins by overloading `PreBuiltTokenFilterFactoryFactory` and `PreBuiltAnalyzerProviderFactory`.

Closes #18.
dadoonet added a commit to elastic/elasticsearch-analysis-stempel that referenced this issue Feb 5, 2014
Due to fix [3790](elastic/elasticsearch#3790) in core, upgrading an analyzer provided as a plugin now fails.

See elastic/elasticsearch#4936 for details.

Issue is in elasticsearch core code but can be fixed in plugins by overloading `PreBuiltTokenFilterFactoryFactory` and `PreBuiltAnalyzerProviderFactory`.

Closes #18.
(cherry picked from commit fc68d81)
dadoonet added a commit to elastic/elasticsearch-analysis-kuromoji that referenced this issue Feb 28, 2014
Due to fix [3790](elastic/elasticsearch#3790) in core, upgrading an analyzer provided as a plugin now fails.

See elastic/elasticsearch#5030 for details.

Issue is in elasticsearch core code but can be fixed in plugins by overloading `PreBuiltAnalyzerProviderFactory`,  `PreBuiltTokenFilterFactoryFactory`, `PreBuiltTokenizerFactoryFactory` or `PreBuiltCharFilterFactoryFactory ` when used.

Closes #21
(cherry picked from commit 3401c21)
dadoonet added a commit to elastic/elasticsearch-analysis-kuromoji that referenced this issue Feb 28, 2014
Due to fix [3790](elastic/elasticsearch#3790) in core, upgrading an analyzer provided as a plugin now fails.

See elastic/elasticsearch#5030 for details.

Issue is in elasticsearch core code but can be fixed in plugins by overloading `PreBuiltAnalyzerProviderFactory`,  `PreBuiltTokenFilterFactoryFactory`, `PreBuiltTokenizerFactoryFactory` or `PreBuiltCharFilterFactoryFactory ` when used.

Closes #21
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
This patch takes the version of the created index into account when a
prebuilt analyzer is created.
So, if an index was created with 0.90.4, then the prebuilt analyzers
will be the same than on the 0.90.4 release.

One reason for this feature is the possibility to change pre built
analyzers like the standard one.

The patch tries to reuse analyzers as mutch as possible. So even if
version X.Y.Z and X.Y.A use the same lucene analyzers, the same instance
is reused in order to prevent overcreation of lucene analyzer instances.

Closes elastic#3790
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants