-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Simplify analyzer settings #9371
Comments
Previously, setting just Given that we're planning on removing that in #9279, I'm +1 on this change. |
|
@colings86 That does not remove all the trappy behaviors. There are two traps: one is the "defaults" if you leave something blank (see clinton's example), the other is using 'analyzer' in combination with index/search analyzer. +1 to ryan's proposal. I'm -1 to any solution that doesnt solve both the traps. |
@rmuir sorry, I think what I wrote didn't explain completely what my thinking is. What I propose is that we leave the names of the options as they are (because the names are currently clear on what they affect) but we add validation that says:
Thinking about it, I don't think it's a good idea to let people set either |
I agree, with those rules it can also solve the problems. However, i think its a more complicated set of rules to enforce, just to support exotic cases. Either way, as long as the 'analyzer' case is easy, i am fine. |
@colings86 Yes, those rules will "work" for validation, but I agree with Robert that it is just added complication. It also makes the system more difficult on the user. Imagine a typical case where you have set your |
I like the clarity of the name I think I'm opting for |
The `analyzer` setting is now the base setting, and `search_analyzer` is simply an override of the search time analyzer. When setting `search_analyzer`, `analyzer` must be set. closes elastic#9371
We currently have the following settings on text fields and some other types:
analyzer
,index_analyzer
,search_analyzer
, andsearch_quote_analyzer
. I think we should simplify this by removingindex_analyzer
, and then add validation so that if you set one of these, you must also set the ones before it in the list. Otherwise you get the current trappy behavior of being able to specifysearch_analyzer
and notindex_analyzer
, which leads to using thestandard
analyzer at index time. It also leaves the "normal" use case as setting justanalyzer
, and removes the weird case where you can setanalyzer
,index_analyzer
andsearch_analyzer
.As an aside, I think we also need a mechanism to distinguish when parsing mappings between "this is an api call" and "we are reading old mappings from cluster state". With this flag, we can then modify the mappings on parse, so that the old settings disappear when upgrading. AFAIK right now, we only have the
indexVersionCreated()
which only says on what version the index was created, but updates could still happen for that index and the version would not change.The text was updated successfully, but these errors were encountered: